home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 June: Reference Library / Dev.CD Jun 94.toast / Technical Documentation / Mac Tech Notes (DocViewer) / QuickTime / QT05-Component Mgr 3.0 < prev    next >
MacBinary  |  1994-04-27  |  93.9 KB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Banyans VINES patch data (other/banyansVINESPatchData) ext Unsupported
1% dexvert PCP archive log (other/pcpArchiveLog) ext Unsupported
100% file MacBinary II, inited, Tue Apr 19 12:04:36 1994, modified Wed Apr 27 06:15:43 1994, creator 'HLX2', type 'ONLN', 93035 bytes "QT05-Component Mgr 3.0" , at 0x16beb 2876 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 16 51 54 30 35 2d 43 | 6f 6d 70 6f 6e 65 6e 74 |..QT05-C|omponent|
|00000010| 20 4d 67 72 20 33 2e 30 | 00 00 00 00 00 00 00 00 | Mgr 3.0|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 01 6b 6b 00 | 00 0b 3c a9 d9 b1 94 a9 |.....kk.|..<.....|
|00000060| e3 eb cf 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 66 9c 00 00 |........|....f...|
|00000080| 51 54 20 30 35 20 2d 20 | 43 6f 6d 70 6f 6e 65 6e |QT 05 - |Componen|
|00000090| 74 20 4d 61 6e 61 67 65 | 72 20 76 65 72 73 69 6f |t Manage|r versio|
|000000a0| 6e 20 33 2e 30 0d 51 75 | 69 63 6b 54 69 6d 65 09 |n 3.0.Qu|ickTime.|
|000000b0| 26 20 44 61 76 65 20 52 | 61 64 63 6c 69 66 66 65 |& Dave R|adcliffe|
|000000c0| 09 4d 61 72 63 68 20 31 | 39 39 34 0d 54 68 69 73 |.March 1|994.This|
|000000d0| 20 6e 6f 74 65 20 63 6f | 6e 74 61 69 6e 73 20 69 | note co|ntains i|
|000000e0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 72 65 67 61 72 |nformati|on regar|
|000000f0| 64 69 6e 67 20 74 68 65 | 20 76 65 72 73 69 6f 6e |ding the| version|
|00000100| 20 6f 66 20 74 68 65 20 | 43 6f 6d 70 6f 6e 65 6e | of the |Componen|
|00000110| 74 20 4d 61 6e 61 67 65 | 72 20 74 68 61 74 20 73 |t Manage|r that s|
|00000120| 68 69 70 70 65 64 20 77 | 69 74 68 20 51 75 69 63 |hipped w|ith Quic|
|00000130| 6b 54 69 6d 65 20 31 2e | 36 20 61 6e 64 20 74 68 |kTime 1.|6 and th|
|00000140| 65 20 63 68 61 6e 67 65 | 73 20 6e 65 63 65 73 73 |e change|s necess|
|00000150| 61 72 79 20 74 6f 20 73 | 75 70 70 6f 72 74 20 6e |ary to s|upport n|
|00000160| 61 74 69 76 65 20 50 6f | 77 65 72 50 43 20 63 6f |ative Po|werPC co|
|00000170| 6d 70 6f 6e 65 6e 74 73 | 2e 0d 54 6f 70 69 63 73 |mponents|..Topics|
|00000180| 0d a5 20 51 75 69 63 6b | 54 69 6d 65 20 31 2e 36 |.. Quick|Time 1.6|
|00000190| 20 61 6e 64 20 43 6f 6d | 70 6f 6e 65 6e 74 20 4d | and Com|ponent M|
|000001a0| 61 6e 61 67 65 72 20 33 | 2e 30 0d a5 20 4e 61 74 |anager 3|.0.. Nat|
|000001b0| 69 76 65 20 50 6f 77 65 | 72 50 43 20 63 6f 6d 70 |ive Powe|rPC comp|
|000001c0| 6f 6e 65 6e 74 73 0d 49 | 6e 74 72 6f 64 75 63 74 |onents.I|ntroduct|
|000001d0| 69 6f 6e 0d 54 68 65 20 | 43 6f 6d 70 6f 6e 65 6e |ion.The |Componen|
|000001e0| 74 20 4d 61 6e 61 67 65 | 72 20 69 6e 20 51 75 69 |t Manage|r in Qui|
|000001f0| 63 6b 54 69 6d 65 20 31 | 2e 36 2e 78 20 61 6e 64 |ckTime 1|.6.x and|
|00000200| 20 66 6f 72 20 74 68 65 | 20 50 6f 77 65 72 20 4d | for the| Power M|
|00000210| 61 63 69 6e 74 6f 73 68 | 20 28 50 6f 77 65 72 50 |acintosh| (PowerP|
|00000220| 43 29 20 72 65 6c 65 61 | 73 65 20 68 61 73 20 73 |C) relea|se has s|
|00000230| 6f 6d 65 20 6e 65 77 20 | 66 65 61 74 75 72 65 73 |ome new |features|
|00000240| 2e 20 49 74 20 68 61 73 | 20 61 64 64 65 64 20 74 |. It has| added t|
|00000250| 68 65 20 61 62 69 6c 69 | 74 79 20 74 6f 20 61 75 |he abili|ty to au|
|00000260| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 72 65 73 6f |tomatica|lly reso|
|00000270| 6c 76 65 20 63 6f 6e 66 | 6c 69 63 74 73 20 62 65 |lve conf|licts be|
|00000280| 74 77 65 65 6e 20 64 69 | 66 66 65 72 65 6e 74 20 |tween di|fferent |
|00000290| 76 65 72 73 69 6f 6e 73 | 20 6f 66 20 74 68 65 20 |versions| of the |
|000002a0| 73 61 6d 65 20 63 6f 6d | 70 6f 6e 65 6e 74 2e 20 |same com|ponent. |
|000002b0| 49 74 20 77 69 6c 6c 20 | 65 6e 73 75 72 65 20 74 |It will |ensure t|
|000002c0| 68 61 74 20 6f 6e 6c 79 | 20 74 68 65 20 6d 6f 73 |hat only| the mos|
|000002d0| 74 20 72 65 63 65 6e 74 | 20 76 65 72 73 69 6f 6e |t recent| version|
|000002e0| 20 6f 66 20 61 20 67 69 | 76 65 6e 20 63 6f 6d 70 | of a gi|ven comp|
|000002f0| 6f 6e 65 6e 74 20 69 73 | 20 61 63 74 75 61 6c 6c |onent is| actuall|
|00000300| 79 20 72 65 67 69 73 74 | 65 72 65 64 2e 20 54 68 |y regist|ered. Th|
|00000310| 65 20 43 6f 6d 70 6f 6e | 65 6e 74 20 4d 61 6e 61 |e Compon|ent Mana|
|00000320| 67 65 72 20 6e 6f 77 20 | 73 75 70 70 6f 72 74 73 |ger now |supports|
|00000330| 20 49 63 6f 6e 20 53 75 | 69 74 65 73 20 66 6f 72 | Icon Su|ites for|
|00000340| 20 61 20 63 6f 6d 70 6f | 6e 65 6e 74 2c 20 73 6f | a compo|nent, so|
|00000350| 20 61 20 63 6f 6d 70 6f | 6e 65 6e 74 d5 73 20 69 | a compo|nent.s i|
|00000360| 63 6f 6e 20 6e 6f 20 6c | 6f 6e 67 65 72 20 68 61 |con no l|onger ha|
|00000370| 73 20 74 6f 20 62 65 20 | 6a 75 73 74 20 62 6c 61 |s to be |just bla|
|00000380| 63 6b 20 61 6e 64 20 77 | 68 69 74 65 2e 20 49 6e |ck and w|hite. In|
|00000390| 20 61 64 64 69 74 69 6f | 6e 2c 20 74 68 65 20 43 | additio|n, the C|
|000003a0| 6f 6d 70 6f 6e 65 6e 74 | 20 4d 61 6e 61 67 65 72 |omponent| Manager|
|000003b0| 20 63 61 6e 20 73 75 70 | 70 6f 72 74 20 63 6f 64 | can sup|port cod|
|000003c0| 65 20 77 72 69 74 74 65 | 6e 20 69 6e 20 74 68 65 |e writte|n in the|
|000003d0| 20 6e 61 74 69 76 65 20 | 66 6f 72 6d 61 74 20 6f | native |format o|
|000003e0| 66 20 74 68 65 20 50 6f | 77 65 72 50 43 2e 0d 54 |f the Po|werPC..T|
|000003f0| 68 65 20 72 65 73 75 6c | 74 20 72 65 74 75 72 6e |he resul|t return|
|00000400| 65 64 20 66 6f 72 20 74 | 68 65 20 47 65 73 74 61 |ed for t|he Gesta|
|00000410| 6c 74 20 73 65 6c 65 63 | 74 6f 72 20 67 65 73 74 |lt selec|tor gest|
|00000420| 61 6c 74 43 6f 6d 70 6f | 6e 65 6e 74 4d 67 72 20 |altCompo|nentMgr |
|00000430| 77 69 6c 6c 20 62 65 20 | 33 2c 20 69 6e 64 69 63 |will be |3, indic|
|00000440| 61 74 69 6e 67 20 76 65 | 72 73 69 6f 6e 20 6e 75 |ating ve|rsion nu|
|00000450| 6d 62 65 72 20 33 20 6f | 66 20 74 68 65 20 43 6f |mber 3 o|f the Co|
|00000460| 6d 70 6f 6e 65 6e 74 20 | 4d 61 6e 61 67 65 72 2e |mponent |Manager.|
|00000470| 20 54 68 69 73 20 69 73 | 20 74 68 65 20 76 65 72 | This is| the ver|
|00000480| 73 69 6f 6e 20 62 65 69 | 6e 67 20 64 69 73 63 75 |sion bei|ng discu|
|00000490| 73 73 65 64 20 69 6e 20 | 74 68 69 73 20 6e 6f 74 |ssed in |this not|
|000004a0| 65 2e 20 54 6f 20 69 6e | 73 75 72 65 20 74 68 61 |e. To in|sure tha|
|000004b0| 74 20 79 6f 75 20 68 61 | 76 65 20 74 68 65 20 66 |t you ha|ve the f|
|000004c0| 65 61 74 75 72 65 73 20 | 64 69 73 63 75 73 73 65 |eatures |discusse|
|000004d0| 64 20 68 65 72 65 2c 20 | 63 68 65 63 6b 20 74 68 |d here, |check th|
|000004e0| 61 74 20 76 65 72 73 69 | 6f 6e 20 33 20 69 73 20 |at versi|on 3 is |
|000004f0| 69 6e 73 74 61 6c 6c 65 | 64 2e 0d 46 6f 72 20 73 |installe|d..For s|
|00000500| 75 70 70 6f 72 74 20 6f | 66 20 74 68 65 20 50 6f |upport o|f the Po|
|00000510| 77 65 72 20 4d 61 63 69 | 6e 74 6f 73 68 2c 20 74 |wer Maci|ntosh, t|
|00000520| 68 65 20 43 6f 6d 70 6f | 6e 65 6e 74 20 4d 61 6e |he Compo|nent Man|
|00000530| 61 67 65 72 20 68 61 73 | 20 62 65 65 6e 20 65 78 |ager has| been ex|
|00000540| 74 65 6e 64 65 64 20 74 | 6f 20 61 6c 6c 6f 77 20 |tended t|o allow |
|00000550| 75 73 65 20 6f 66 20 6e | 61 74 69 76 65 20 50 6f |use of n|ative Po|
|00000560| 77 65 72 50 43 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |werPC co|mponents|
|00000570| 2e 20 57 68 65 6e 20 74 | 68 65 20 43 6f 6d 70 6f |. When t|he Compo|
|00000580| 6e 65 6e 74 20 4d 61 6e | 61 67 65 72 20 6c 6f 61 |nent Man|ager loa|
|00000590| 64 73 20 61 20 6e 61 74 | 69 76 65 20 63 6f 6d 70 |ds a nat|ive comp|
|000005a0| 6f 6e 65 6e 74 20 6f 6e | 20 74 68 65 20 50 6f 77 |onent on| the Pow|
|000005b0| 65 72 20 4d 61 63 69 6e | 74 6f 73 68 2c 20 69 74 |er Macin|tosh, it|
|000005c0| 20 63 61 6c 6c 73 20 75 | 73 65 73 20 74 68 65 20 | calls u|ses the |
|000005d0| 43 6f 64 65 20 46 72 61 | 67 6d 65 6e 74 20 4d 61 |Code Fra|gment Ma|
|000005e0| 6e 61 67 65 72 20 61 6e | 64 20 63 61 6c 6c 73 20 |nager an|d calls |
|000005f0| 47 65 74 4d 65 6d 46 72 | 61 67 6d 65 6e 74 20 61 |GetMemFr|agment a|
|00000600| 6e 64 20 74 68 65 6e 20 | 6c 61 74 65 72 20 43 6c |nd then |later Cl|
|00000610| 6f 73 65 43 6f 6e 6e 65 | 63 74 69 6f 6e 20 77 68 |oseConne|ction wh|
|00000620| 65 6e 20 69 74 20 75 6e | 6c 6f 61 64 73 20 79 6f |en it un|loads yo|
|00000630| 75 72 20 63 6f 64 65 20 | 72 65 73 6f 75 72 63 65 |ur code |resource|
|00000640| 20 28 73 70 65 63 69 66 | 69 65 64 20 69 6e 20 61 | (specif|ied in a|
|00000650| 20 43 6f 6d 70 6f 6e 65 | 6e 74 50 6c 61 74 66 6f | Compone|ntPlatfo|
|00000660| 72 6d 49 6e 66 6f 29 2e | 20 54 68 69 73 20 69 73 |rmInfo).| This is|
|00000670| 20 68 6f 77 20 74 68 65 | 20 43 6f 6d 70 6f 6e 65 | how the| Compone|
|00000680| 6e 74 20 4d 61 6e 61 67 | 65 72 20 73 75 70 70 6f |nt Manag|er suppo|
|00000690| 72 74 73 20 61 20 6e 61 | 74 69 76 65 20 63 6f 64 |rts a na|tive cod|
|000006a0| 65 20 66 72 61 67 6d 65 | 6e 74 2e 0d 41 20 63 6f |e fragme|nt..A co|
|000006b0| 6d 70 6f 6e 65 6e 74 20 | 63 61 6e 20 73 75 70 70 |mponent |can supp|
|000006c0| 6f 72 74 20 6d 75 6c 74 | 69 70 6c 65 20 70 6c 61 |ort mult|iple pla|
|000006d0| 74 66 6f 72 6d 73 20 73 | 75 63 68 20 61 73 20 74 |tforms s|uch as t|
|000006e0| 68 65 20 36 38 4b 20 61 | 6e 64 20 50 6f 77 65 72 |he 68K a|nd Power|
|000006f0| 50 43 2e 20 45 78 69 73 | 74 69 6e 67 20 36 38 4b |PC. Exis|ting 68K|
|00000700| 20 63 6f 64 65 20 69 73 | 20 61 6c 77 61 79 73 20 | code is| always |
|00000710| 73 75 70 70 6f 72 74 65 | 64 20 6f 6e 20 74 68 65 |supporte|d on the|
|00000720| 20 50 6f 77 65 72 20 4d | 61 63 69 6e 74 6f 73 68 | Power M|acintosh|
|00000730| 20 74 68 72 6f 75 67 68 | 20 65 6d 75 6c 61 74 69 | through| emulati|
|00000740| 6f 6e 2e 20 42 75 74 20 | 79 6f 75 20 63 61 6e 20 |on. But |you can |
|00000750| 61 6c 73 6f 20 68 61 76 | 65 20 6e 61 74 69 76 65 |also hav|e native|
|00000760| 20 50 6f 77 65 72 50 43 | 20 63 6f 64 65 20 66 6f | PowerPC| code fo|
|00000770| 72 20 79 6f 75 72 20 63 | 6f 6d 70 6f 6e 65 6e 74 |r your c|omponent|
|00000780| 20 74 6f 20 73 75 70 70 | 6f 72 74 20 62 65 74 74 | to supp|ort bett|
|00000790| 65 72 20 70 65 72 66 6f | 72 6d 61 6e 63 65 2e 20 |er perfo|rmance. |
|000007a0| 54 68 65 20 43 6f 6d 70 | 6f 6e 65 6e 74 20 4d 61 |The Comp|onent Ma|
|000007b0| 6e 61 67 65 72 20 77 69 | 6c 6c 20 61 6c 6c 6f 77 |nager wi|ll allow|
|000007c0| 20 79 6f 75 20 74 6f 20 | 63 72 65 61 74 65 20 61 | you to |create a|
|000007d0| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 74 68 61 74 20 | compone|nt that |
|000007e0| 63 6f 6e 74 61 69 6e 73 | 20 62 6f 74 68 20 63 6f |contains| both co|
|000007f0| 64 65 20 66 6f 72 6d 61 | 74 73 2c 20 73 6f 20 74 |de forma|ts, so t|
|00000800| 68 61 74 20 79 6f 75 20 | 63 61 6e 20 73 75 70 70 |hat you |can supp|
|00000810| 6f 72 74 20 61 6c 6c 20 | 70 6c 61 74 66 6f 72 6d |ort all |platform|
|00000820| 73 20 77 69 74 68 20 61 | 20 73 69 6e 67 6c 65 20 |s with a| single |
|00000830| 63 6f 6d 70 6f 6e 65 6e | 74 2e 20 54 68 65 20 43 |componen|t. The C|
|00000840| 6f 6d 70 6f 6e 65 6e 74 | 20 4d 61 6e 61 67 65 72 |omponent| Manager|
|00000850| 20 61 6c 73 6f 20 77 61 | 73 20 65 78 74 65 6e 64 | also wa|s extend|
|00000860| 65 64 20 69 6e 20 61 20 | 77 61 79 20 74 68 61 74 |ed in a |way that|
|00000870| 20 61 6c 6c 6f 77 73 20 | 66 6f 72 20 6e 61 74 69 | allows |for nati|
|00000880| 76 65 20 50 6f 77 65 72 | 50 43 20 6f 6e 6c 79 20 |ve Power|PC only |
|00000890| 63 6f 6d 70 6f 6e 65 6e | 74 73 20 28 77 69 74 68 |componen|ts (with|
|000008a0| 6f 75 74 20 61 6e 79 20 | 36 38 4b 20 63 6f 64 65 |out any |68K code|
|000008b0| 20 73 75 70 70 6f 72 74 | 29 2e 0d 45 78 74 65 6e | support|)..Exten|
|000008c0| 64 65 64 20 43 6f 6d 70 | 6f 6e 65 6e 74 52 65 73 |ded Comp|onentRes|
|000008d0| 6f 75 72 63 65 0d 54 68 | 65 20 43 6f 6d 70 6f 6e |ource.Th|e Compon|
|000008e0| 65 6e 74 52 65 73 6f 75 | 72 63 65 20 64 61 74 61 |entResou|rce data|
|000008f0| 20 73 74 72 75 63 74 75 | 72 65 20 28 74 68 65 20 | structu|re (the |
|00000900| 27 74 68 6e 67 27 20 72 | 65 73 6f 75 72 63 65 29 |'thng' r|esource)|
|00000910| 20 68 61 73 20 62 65 65 | 6e 20 65 78 74 65 6e 64 | has bee|n extend|
|00000920| 65 64 2e 20 54 68 65 73 | 65 20 65 78 74 65 6e 73 |ed. Thes|e extens|
|00000930| 69 6f 6e 73 20 64 65 66 | 69 6e 65 20 61 64 64 69 |ions def|ine addi|
|00000940| 74 69 6f 6e 61 6c 20 69 | 6e 66 6f 72 6d 61 74 69 |tional i|nformati|
|00000950| 6f 6e 20 61 62 6f 75 74 | 20 74 68 65 20 63 6f 6d |on about| the com|
|00000960| 70 6f 6e 65 6e 74 2e 20 | 54 68 65 20 63 6f 6d 70 |ponent. |The comp|
|00000970| 6c 65 74 65 20 64 61 74 | 61 20 73 74 72 75 63 74 |lete dat|a struct|
|00000980| 75 72 65 20 69 73 20 73 | 68 6f 77 6e 20 62 65 6c |ure is s|hown bel|
|00000990| 6f 77 2e 20 54 68 65 20 | 66 69 72 73 74 20 70 6f |ow. The |first po|
|000009a0| 72 74 69 6f 6e 20 69 73 | 20 74 68 65 20 73 61 6d |rtion is| the sam|
|000009b0| 65 20 61 73 20 74 68 65 | 20 65 78 69 73 74 69 6e |e as the| existin|
|000009c0| 67 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 6f 75 |g Compon|entResou|
|000009d0| 72 63 65 2c 20 77 69 74 | 68 20 74 68 65 20 6e 65 |rce, wit|h the ne|
|000009e0| 77 20 66 69 65 6c 64 73 | 20 61 64 64 65 64 20 61 |w fields| added a|
|000009f0| 74 20 74 68 65 20 65 6e | 64 2e 20 54 68 65 20 43 |t the en|d. The C|
|00000a00| 6f 6d 70 6f 6e 65 6e 74 | 20 4d 61 6e 61 67 65 72 |omponent| Manager|
|00000a10| 20 64 65 74 65 72 6d 69 | 6e 65 73 20 69 66 20 69 | determi|nes if i|
|00000a20| 74 20 69 73 20 70 72 65 | 73 65 6e 74 20 62 79 20 |t is pre|sent by |
|00000a30| 65 78 61 6d 69 6e 69 6e | 67 20 74 68 65 20 73 69 |examinin|g the si|
|00000a40| 7a 65 20 6f 66 20 74 68 | 65 20 27 74 68 6e 67 27 |ze of th|e 'thng'|
|00000a50| 20 72 65 73 6f 75 72 63 | 65 2e 0d 73 74 72 75 63 | resourc|e..struc|
|00000a60| 74 20 45 78 74 43 6f 6d | 70 6f 6e 65 6e 74 52 65 |t ExtCom|ponentRe|
|00000a70| 73 6f 75 72 63 65 20 7b | 0d 09 43 6f 6d 70 6f 6e |source {|..Compon|
|00000a80| 65 6e 74 44 65 73 63 72 | 69 70 74 69 6f 6e 09 63 |entDescr|iption.c|
|00000a90| 64 3b 09 09 09 2f 2a 20 | 52 65 67 69 73 74 72 61 |d;.../* |Registra|
|00000aa0| 74 69 6f 6e 20 70 61 72 | 61 6d 65 74 65 72 73 20 |tion par|ameters |
|00000ab0| 2a 2f 0d 09 52 65 73 6f | 75 72 63 65 53 70 65 63 |*/..Reso|urceSpec|
|00000ac0| 20 09 63 6f 6d 70 6f 6e | 65 6e 74 3b 09 09 09 2f | .compon|ent;.../|
|00000ad0| 2a 20 72 65 73 6f 75 72 | 63 65 20 77 68 65 72 65 |* resour|ce where|
|00000ae0| 20 43 6f 6d 70 6f 6e 65 | 6e 74 20 63 6f 64 65 20 | Compone|nt code |
|00000af0| 09 09 09 09 09 09 09 20 | 20 20 69 73 20 66 6f 75 |....... | is fou|
|00000b00| 6e 64 20 2a 2f 0d 09 52 | 65 73 6f 75 72 63 65 53 |nd */..R|esourceS|
|00000b10| 70 65 63 09 63 6f 6d 70 | 6f 6e 65 6e 74 4e 61 6d |pec.comp|onentNam|
|00000b20| 65 3b 09 09 2f 2a 20 6e | 61 6d 65 20 73 74 72 69 |e;../* n|ame stri|
|00000b30| 6e 67 20 72 65 73 6f 75 | 72 63 65 20 2a 2f 0d 09 |ng resou|rce */..|
|00000b40| 52 65 73 6f 75 72 63 65 | 53 70 65 63 09 63 6f 6d |Resource|Spec.com|
|00000b50| 70 6f 6e 65 6e 74 49 6e | 66 6f 3b 09 09 2f 2a 20 |ponentIn|fo;../* |
|00000b60| 69 6e 66 6f 20 73 74 72 | 69 6e 67 20 72 65 73 6f |info str|ing reso|
|00000b70| 75 72 63 65 20 2a 2f 0d | 09 52 65 73 6f 75 72 63 |urce */.|.Resourc|
|00000b80| 65 53 70 65 63 09 63 6f | 6d 70 6f 6e 65 6e 74 49 |eSpec.co|mponentI|
|00000b90| 63 6f 6e 3b 09 09 2f 2a | 20 69 63 6f 6e 20 72 65 |con;../*| icon re|
|00000ba0| 73 6f 75 72 63 65 20 2a | 2f 0d 09 2f 2a 20 6e 65 |source *|/../* ne|
|00000bb0| 77 20 64 61 74 61 20 66 | 6f 72 20 43 6f 6d 70 6f |w data f|or Compo|
|00000bc0| 6e 65 6e 74 20 4d 61 6e | 61 67 65 72 20 76 65 72 |nent Man|ager ver|
|00000bd0| 73 69 6f 6e 20 33 20 2a | 2f 0d 09 6c 6f 6e 67 09 |sion 3 *|/..long.|
|00000be0| 09 63 6f 6d 70 6f 6e 65 | 6e 74 56 65 72 73 69 6f |.compone|ntVersio|
|00000bf0| 6e 3b 09 09 2f 2a 20 76 | 65 72 73 69 6f 6e 20 6f |n;../* v|ersion o|
|00000c00| 66 20 43 6f 6d 70 6f 6e | 65 6e 74 20 2a 2f 0d 09 |f Compon|ent */..|
|00000c10| 6c 6f 6e 67 09 09 63 6f | 6d 70 6f 6e 65 6e 74 52 |long..co|mponentR|
|00000c20| 65 67 69 73 74 65 72 46 | 6c 61 67 73 3b 09 2f 2a |egisterF|lags;./*|
|00000c30| 20 66 6c 61 67 73 20 66 | 6f 72 20 72 65 67 69 73 | flags f|or regis|
|00000c40| 74 72 61 74 69 6f 6e 20 | 2a 2f 0d 09 73 68 6f 72 |tration |*/..shor|
|00000c50| 74 09 09 63 6f 6d 70 6f | 6e 65 6e 74 49 63 6f 6e |t..compo|nentIcon|
|00000c60| 46 61 6d 69 6c 79 3b 09 | 09 2f 2a 20 72 65 73 6f |Family;.|./* reso|
|00000c70| 75 72 63 65 20 69 64 20 | 6f 66 20 49 63 6f 6e 20 |urce id |of Icon |
|00000c80| 46 61 6d 69 6c 79 20 2a | 2f 0d 09 6c 6f 6e 67 09 |Family *|/..long.|
|00000c90| 09 63 6f 75 6e 74 3b 09 | 09 09 09 2f 2a 20 65 6c |.count;.|.../* el|
|00000ca0| 65 6d 65 6e 74 73 20 69 | 6e 20 70 6c 61 74 66 6f |ements i|n platfo|
|00000cb0| 72 6d 41 72 72 61 79 20 | 2a 2f 0d 09 43 6f 6d 70 |rmArray |*/..Comp|
|00000cc0| 6f 6e 65 6e 74 50 6c 61 | 74 66 6f 72 6d 49 6e 66 |onentPla|tformInf|
|00000cd0| 6f 20 70 6c 61 74 66 6f | 72 6d 41 72 72 61 79 5b |o platfo|rmArray[|
|00000ce0| 31 5d 3b 0d 7d 3b 0d 63 | 6f 6d 70 6f 6e 65 6e 74 |1];.};.c|omponent|
|00000cf0| 56 65 72 73 69 6f 6e 20 | 0d 54 68 65 20 63 6f 6d |Version |.The com|
|00000d00| 70 6f 6e 65 6e 74 56 65 | 72 73 69 6f 6e 20 66 69 |ponentVe|rsion fi|
|00000d10| 65 6c 64 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |eld cont|ains the|
|00000d20| 20 76 65 72 73 69 6f 6e | 20 6e 75 6d 62 65 72 20 | version| number |
|00000d30| 6f 66 20 74 68 65 20 63 | 6f 6d 70 6f 6e 65 6e 74 |of the c|omponent|
|00000d40| 2e 20 54 68 69 73 20 73 | 68 6f 75 6c 64 20 62 65 |. This s|hould be|
|00000d50| 20 69 64 65 6e 74 69 63 | 61 6c 20 74 6f 20 74 68 | identic|al to th|
|00000d60| 65 20 76 61 6c 75 65 20 | 72 65 74 75 72 6e 65 64 |e value |returned|
|00000d70| 20 62 79 20 47 65 74 43 | 6f 6d 70 6f 6e 65 6e 74 | by GetC|omponent|
|00000d80| 56 65 72 73 69 6f 6e 2e | 20 46 6f 72 20 63 6f 6e |Version.| For con|
|00000d90| 76 65 6e 69 65 6e 63 65 | 2c 20 69 66 20 74 68 69 |venience|, if thi|
|00000da0| 73 20 76 61 6c 75 65 20 | 69 73 20 73 65 74 20 74 |s value |is set t|
|00000db0| 6f 20 30 2c 20 74 68 65 | 20 63 6f 6d 70 6f 6e 65 |o 0, the| compone|
|00000dc0| 6e 74 20 69 73 20 63 61 | 6c 6c 65 64 20 74 6f 20 |nt is ca|lled to |
|00000dd0| 67 65 74 20 74 68 65 20 | 76 65 72 73 69 6f 6e 2e |get the |version.|
|00000de0| 20 54 68 69 73 20 69 73 | 20 75 73 65 66 75 6c 20 | This is| useful |
|00000df0| 64 75 72 69 6e 67 20 64 | 65 76 65 6c 6f 70 6d 65 |during d|evelopme|
|00000e00| 6e 74 2e 20 54 68 65 20 | 76 65 72 73 69 6f 6e 20 |nt. The |version |
|00000e10| 6e 75 6d 62 65 72 20 73 | 74 6f 72 65 64 20 69 6e |number s|tored in|
|00000e20| 20 74 68 65 20 43 6f 6d | 70 6f 6e 65 6e 74 52 65 | the Com|ponentRe|
|00000e30| 73 6f 75 72 63 65 45 78 | 74 65 6e 73 69 6f 6e 20 |sourceEx|tension |
|00000e40| 69 73 20 75 73 65 64 20 | 62 79 20 74 68 65 20 43 |is used |by the C|
|00000e50| 6f 6d 70 6f 6e 65 6e 74 | 20 4d 61 6e 61 67 65 72 |omponent| Manager|
|00000e60| 20 74 6f 20 61 76 6f 69 | 64 20 68 61 76 69 6e 67 | to avoi|d having|
|00000e70| 20 74 6f 20 6c 6f 61 64 | 20 61 6e 64 20 63 61 6c | to load| and cal|
|00000e80| 6c 20 74 68 65 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |l the co|mponent |
|00000e90| 74 6f 20 72 65 74 72 69 | 65 76 65 20 74 68 65 20 |to retri|eve the |
|00000ea0| 63 6f 6d 70 6f 6e 65 6e | 74 d5 73 20 76 65 72 73 |componen|t.s vers|
|00000eb0| 69 6f 6e 20 64 75 72 69 | 6e 67 20 73 74 61 72 74 |ion duri|ng start|
|00000ec0| 75 70 2e 0d 63 6f 6d 70 | 6f 6e 65 6e 74 52 65 67 |up..comp|onentReg|
|00000ed0| 69 73 74 65 72 46 6c 61 | 67 73 0d 20 0d 54 68 65 |isterFla|gs. .The|
|00000ee0| 20 63 6f 6d 70 6f 6e 65 | 6e 74 52 65 67 69 73 74 | compone|ntRegist|
|00000ef0| 65 72 46 6c 61 67 73 20 | 61 6c 6c 6f 77 20 79 6f |erFlags |allow yo|
|00000f00| 75 20 74 6f 20 64 65 66 | 69 6e 65 20 61 64 64 69 |u to def|ine addi|
|00000f10| 74 69 6f 6e 61 6c 20 72 | 65 67 69 73 74 65 72 20 |tional r|egister |
|00000f20| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2e 20 54 68 65 |informat|ion. The|
|00000f30| 73 65 20 66 6c 61 67 73 | 20 61 72 65 20 64 69 73 |se flags| are dis|
|00000f40| 63 75 73 73 65 64 20 62 | 65 6c 6f 77 2e 20 0d 2f |cussed b|elow. ./|
|00000f50| 2a 20 43 6f 6d 70 6f 6e | 65 6e 74 20 52 65 73 6f |* Compon|ent Reso|
|00000f60| 75 72 63 65 20 45 78 74 | 65 6e 73 69 6f 6e 20 66 |urce Ext|ension f|
|00000f70| 6c 61 67 73 20 2a 2f 0d | 63 6f 6d 70 6f 6e 65 6e |lags */.|componen|
|00000f80| 74 44 6f 41 75 74 6f 56 | 65 72 73 69 6f 6e 20 09 |tDoAutoV|ersion .|
|00000f90| 09 09 3d 20 28 31 3c 3c | 30 29 0d 63 6f 6d 70 6f |..= (1<<|0).compo|
|00000fa0| 6e 65 6e 74 57 61 6e 74 | 73 55 6e 72 65 67 69 73 |nentWant|sUnregis|
|00000fb0| 74 65 72 09 09 09 3d 20 | 28 31 3c 3c 31 29 0d 63 |ter...= |(1<<1).c|
|00000fc0| 6f 6d 70 6f 6e 65 6e 74 | 41 75 74 6f 56 65 72 73 |omponent|AutoVers|
|00000fd0| 69 6f 6e 49 6e 63 6c 75 | 64 65 46 6c 61 67 73 09 |ionInclu|deFlags.|
|00000fe0| 09 3d 20 28 31 3c 3c 32 | 29 0d 63 6f 6d 70 6f 6e |.= (1<<2|).compon|
|00000ff0| 65 6e 74 48 61 73 4d 75 | 6c 74 69 70 6c 65 50 6c |entHasMu|ltiplePl|
|00001000| 61 74 66 6f 72 6d 73 09 | 09 3d 20 28 31 3c 3c 33 |atforms.|.= (1<<3|
|00001010| 29 09 0d 54 68 65 20 63 | 6f 6d 70 6f 6e 65 6e 74 |)..The c|omponent|
|00001020| 44 6f 41 75 74 6f 56 65 | 72 73 69 6f 6e 20 66 6c |DoAutoVe|rsion fl|
|00001030| 61 67 20 74 65 6c 6c 73 | 20 74 68 65 20 43 6f 6d |ag tells| the Com|
|00001040| 70 6f 6e 65 6e 74 20 4d | 61 6e 61 67 65 72 20 74 |ponent M|anager t|
|00001050| 68 61 74 20 79 6f 75 20 | 77 61 6e 74 20 79 6f 75 |hat you |want you|
|00001060| 72 20 63 6f 6d 70 6f 6e | 65 6e 74 20 72 65 67 69 |r compon|ent regi|
|00001070| 73 74 65 72 65 64 20 6f | 6e 6c 79 20 69 66 20 74 |stered o|nly if t|
|00001080| 68 65 72 65 20 69 73 20 | 6e 6f 20 6c 61 74 65 72 |here is |no later|
|00001090| 20 76 65 72 73 69 6f 6e | 20 61 76 61 69 6c 61 62 | version| availab|
|000010a0| 6c 65 2e 20 49 66 20 74 | 68 65 72 65 20 69 73 20 |le. If t|here is |
|000010b0| 61 6e 20 6f 6c 64 65 72 | 20 76 65 72 73 69 6f 6e |an older| version|
|000010c0| 20 6f 66 20 74 68 65 20 | 63 6f 6d 70 6f 6e 65 6e | of the |componen|
|000010d0| 74 20 69 6e 73 74 61 6c | 6c 65 64 2c 20 69 74 20 |t instal|led, it |
|000010e0| 77 69 6c 6c 20 62 65 20 | 75 6e 72 65 67 69 73 74 |will be |unregist|
|000010f0| 65 72 65 64 2e 20 49 66 | 20 61 6e 20 6f 6c 64 65 |ered. If| an olde|
|00001100| 72 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 65 |r versio|n of the|
|00001110| 20 73 61 6d 65 20 63 6f | 6d 70 6f 6e 65 6e 74 20 | same co|mponent |
|00001120| 61 74 74 65 6d 70 74 73 | 20 74 6f 20 72 65 67 69 |attempts| to regi|
|00001130| 73 74 65 72 20 61 66 74 | 65 72 20 79 6f 75 2c 20 |ster aft|er you, |
|00001140| 69 74 20 77 69 6c 6c 20 | 62 65 20 69 6d 6d 65 64 |it will |be immed|
|00001150| 69 61 74 65 6c 79 20 75 | 6e 72 65 67 69 73 74 65 |iately u|nregiste|
|00001160| 72 65 64 2e 20 46 75 72 | 74 68 65 72 2c 20 69 66 |red. Fur|ther, if|
|00001170| 20 61 20 6e 65 77 65 72 | 20 76 65 72 73 69 6f 6e | a newer| version|
|00001180| 20 6f 66 20 74 68 65 20 | 73 61 6d 65 20 63 6f 6d | of the |same com|
|00001190| 70 6f 6e 65 6e 74 20 72 | 65 67 69 73 74 65 72 73 |ponent r|egisters|
|000011a0| 20 61 66 74 65 72 20 79 | 6f 75 2c 20 79 6f 75 20 | after y|ou, you |
|000011b0| 77 69 6c 6c 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |will aut|omatical|
|000011c0| 6c 79 20 62 65 20 75 6e | 72 65 67 69 73 74 65 72 |ly be un|register|
|000011d0| 65 64 2e 20 55 73 69 6e | 67 20 74 68 65 20 61 75 |ed. Usin|g the au|
|000011e0| 74 6f 6d 61 74 69 63 20 | 76 65 72 73 69 6f 6e 20 |tomatic |version |
|000011f0| 63 6f 6e 74 72 6f 6c 20 | 66 65 61 74 75 72 65 20 |control |feature |
|00001200| 6f 66 20 74 68 65 20 43 | 6f 6d 70 6f 6e 65 6e 74 |of the C|omponent|
|00001210| 20 4d 61 6e 61 67 65 72 | 20 61 6c 6c 6f 77 73 20 | Manager| allows |
|00001220| 79 6f 75 20 74 6f 20 6d | 61 6b 65 20 73 75 72 65 |you to m|ake sure|
|00001230| 20 74 68 61 74 20 6f 6e | 6c 79 20 74 68 65 20 6d | that on|ly the m|
|00001240| 6f 73 74 20 72 65 63 65 | 6e 74 20 76 65 72 73 69 |ost rece|nt versi|
|00001250| 6f 6e 20 6f 66 20 79 6f | 75 72 20 73 6f 66 74 77 |on of yo|ur softw|
|00001260| 61 72 65 20 69 73 20 72 | 75 6e 6e 69 6e 67 20 6f |are is r|unning o|
|00001270| 6e 20 61 20 67 69 76 65 | 6e 20 6d 61 63 68 69 6e |n a give|n machin|
|00001280| 65 2c 20 72 65 67 61 72 | 64 6c 65 73 73 20 6f 66 |e, regar|dless of|
|00001290| 20 68 6f 77 20 6d 61 6e | 79 20 76 65 72 73 69 6f | how man|y versio|
|000012a0| 6e 73 20 6d 61 79 20 62 | 65 20 69 6e 73 74 61 6c |ns may b|e instal|
|000012b0| 6c 65 64 2e 0d 54 68 65 | 20 63 6f 6d 70 6f 6e 65 |led..The| compone|
|000012c0| 6e 74 57 61 6e 74 73 55 | 6e 72 65 67 69 73 74 65 |ntWantsU|nregiste|
|000012d0| 72 20 66 6c 61 67 20 69 | 6e 64 69 63 61 74 65 73 |r flag i|ndicates|
|000012e0| 20 74 68 61 74 20 79 6f | 75 72 20 63 6f 6d 70 6f | that yo|ur compo|
|000012f0| 6e 65 6e 74 20 77 61 6e | 74 73 20 74 6f 20 62 65 |nent wan|ts to be|
|00001300| 20 63 61 6c 6c 65 64 20 | 77 68 65 6e 20 69 74 20 | called |when it |
|00001310| 69 73 20 75 6e 72 65 67 | 69 73 74 65 72 65 64 2e |is unreg|istered.|
|00001320| 20 54 68 69 73 20 69 73 | 20 75 73 65 66 75 6c 20 | This is| useful |
|00001330| 69 66 20 79 6f 75 72 20 | 63 6f 6d 70 6f 6e 65 6e |if your |componen|
|00001340| 74 20 61 6c 6c 6f 63 61 | 74 65 73 20 67 6c 6f 62 |t alloca|tes glob|
|00001350| 61 6c 20 6d 65 6d 6f 72 | 79 20 61 74 20 72 65 67 |al memor|y at reg|
|00001360| 69 73 74 65 72 20 74 69 | 6d 65 2c 20 66 6f 72 20 |ister ti|me, for |
|00001370| 65 78 61 6d 70 6c 65 2e | 20 54 68 65 20 70 72 6f |example.| The pro|
|00001380| 74 6f 74 79 70 65 20 6f | 66 20 74 68 65 20 75 6e |totype o|f the un|
|00001390| 72 65 67 69 73 74 65 72 | 20 6d 65 73 73 61 67 65 |register| message|
|000013a0| 20 69 73 20 69 64 65 6e | 74 69 63 61 6c 20 74 6f | is iden|tical to|
|000013b0| 20 74 68 65 20 72 65 67 | 69 73 74 65 72 20 6d 65 | the reg|ister me|
|000013c0| 73 73 61 67 65 2e 20 49 | 66 20 79 6f 75 72 20 63 |ssage. I|f your c|
|000013d0| 6f 6d 70 6f 6e 65 6e 74 | 20 68 61 73 20 6e 65 76 |omponent| has nev|
|000013e0| 65 72 20 62 65 65 6e 20 | 6f 70 65 6e 65 64 2c 20 |er been |opened, |
|000013f0| 69 74 73 20 75 6e 72 65 | 67 69 73 74 65 72 20 6d |its unre|gister m|
|00001400| 65 73 73 61 67 65 20 69 | 73 20 6e 6f 74 20 62 65 |essage i|s not be|
|00001410| 20 63 61 6c 6c 65 64 2e | 20 54 68 65 20 72 6f 75 | called.| The rou|
|00001420| 74 69 6e 65 20 73 65 6c | 65 63 74 6f 72 20 66 6f |tine sel|ector fo|
|00001430| 72 20 75 6e 72 65 67 69 | 73 74 65 72 20 69 73 20 |r unregi|ster is |
|00001440| 67 69 76 65 6e 20 62 65 | 6c 6f 77 2e 0d 6b 43 6f |given be|low..kCo|
|00001450| 6d 70 6f 6e 65 6e 74 55 | 6e 72 65 67 69 73 74 65 |mponentU|nregiste|
|00001460| 72 53 65 6c 65 63 74 20 | 09 09 3d 20 2d 37 20 0d |rSelect |..= -7 .|
|00001470| 54 68 65 20 63 6f 6d 70 | 6f 6e 65 6e 74 41 75 74 |The comp|onentAut|
|00001480| 6f 56 65 72 73 69 6f 6e | 49 6e 63 6c 75 64 65 46 |oVersion|IncludeF|
|00001490| 6c 61 67 73 20 66 6c 61 | 67 20 74 65 6c 6c 73 20 |lags fla|g tells |
|000014a0| 74 68 65 20 43 6f 6d 70 | 6f 6e 65 6e 74 20 4d 61 |the Comp|onent Ma|
|000014b0| 6e 61 67 65 72 20 74 6f | 20 75 73 65 20 74 68 65 |nager to| use the|
|000014c0| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 66 6c 61 67 73 | compone|nt flags|
|000014d0| 20 61 73 20 63 72 69 74 | 65 72 69 61 20 66 6f 72 | as crit|eria for|
|000014e0| 20 69 74 73 20 63 6f 6d | 70 6f 6e 65 6e 74 20 73 | its com|ponent s|
|000014f0| 65 61 72 63 68 2e 20 49 | 66 20 61 20 63 6f 6d 70 |earch. I|f a comp|
|00001500| 6f 6e 65 6e 74 20 77 61 | 6e 74 73 20 61 75 74 6f |onent wa|nts auto|
|00001510| 6d 61 74 69 63 20 76 65 | 72 73 69 6f 6e 20 63 6f |matic ve|rsion co|
|00001520| 6e 74 72 6f 6c 2c 20 74 | 68 65 20 43 6f 6d 70 6f |ntrol, t|he Compo|
|00001530| 6e 65 6e 74 20 4d 61 6e | 61 67 65 72 20 68 61 73 |nent Man|ager has|
|00001540| 20 74 6f 20 73 65 61 72 | 63 68 20 66 6f 72 20 73 | to sear|ch for s|
|00001550| 69 6d 69 6c 61 72 20 63 | 6f 6d 70 6f 6e 65 6e 74 |imilar c|omponent|
|00001560| 73 2e 20 4e 6f 72 6d 61 | 6c 6c 79 2c 20 74 68 65 |s. Norma|lly, the|
|00001570| 20 43 6f 6d 70 6f 6e 65 | 6e 74 20 4d 61 6e 61 67 | Compone|nt Manag|
|00001580| 65 72 20 73 65 61 72 63 | 68 65 73 20 6f 6e 6c 79 |er searc|hes only|
|00001590| 20 66 6f 72 20 61 6e 6f | 74 68 65 72 20 63 6f 6d | for ano|ther com|
|000015a0| 70 6f 6e 65 6e 74 20 75 | 73 69 6e 67 20 74 68 65 |ponent u|sing the|
|000015b0| 20 74 79 70 65 2c 20 73 | 75 62 54 79 70 65 2c 20 | type, s|ubType, |
|000015c0| 61 6e 64 20 6d 61 6e 75 | 66 61 63 74 75 72 65 72 |and manu|facturer|
|000015d0| 20 66 69 65 6c 64 73 20 | 6f 66 20 61 20 43 6f 6d | fields |of a Com|
|000015e0| 70 6f 6e 65 6e 74 44 65 | 73 63 72 69 70 74 69 6f |ponentDe|scriptio|
|000015f0| 6e 20 72 65 63 6f 72 64 | 2e 20 54 68 69 73 20 66 |n record|. This f|
|00001600| 6c 61 67 20 74 65 6c 6c | 73 20 74 68 65 20 43 6f |lag tell|s the Co|
|00001610| 6d 70 6f 6e 65 6e 74 20 | 4d 61 6e 61 67 65 72 20 |mponent |Manager |
|00001620| 74 6f 20 69 6e 63 6c 75 | 64 65 20 74 68 65 20 63 |to inclu|de the c|
|00001630| 6f 6d 70 6f 6e 65 6e 74 | 46 6c 61 67 73 20 69 6e |omponent|Flags in|
|00001640| 20 69 74 73 20 73 65 61 | 72 63 68 2e 0d 54 68 65 | its sea|rch..The|
|00001650| 20 63 6f 6d 70 6f 6e 65 | 6e 74 48 61 73 4d 75 6c | compone|ntHasMul|
|00001660| 74 69 70 6c 65 50 6c 61 | 74 66 6f 72 6d 73 20 66 |tiplePla|tforms f|
|00001670| 6c 61 67 20 69 6e 64 69 | 63 61 74 65 73 20 74 68 |lag indi|cates th|
|00001680| 61 74 20 79 6f 75 72 20 | 63 6f 6d 70 6f 6e 65 6e |at your |componen|
|00001690| 74 20 63 6f 6e 74 61 69 | 6e 73 20 6d 75 6c 74 69 |t contai|ns multi|
|000016a0| 70 6c 65 20 76 65 72 73 | 69 6f 6e 73 20 6f 66 20 |ple vers|ions of |
|000016b0| 74 68 65 20 63 6f 64 65 | 20 66 6f 72 20 64 69 66 |the code| for dif|
|000016c0| 66 65 72 65 6e 74 20 70 | 6c 61 74 66 6f 72 6d 73 |ferent p|latforms|
|000016d0| 2e 20 49 66 20 79 6f 75 | 20 70 6c 61 6e 20 6f 6e |. If you| plan on|
|000016e0| 20 73 75 70 70 6f 72 74 | 69 6e 67 20 74 68 65 20 | support|ing the |
|000016f0| 50 6f 77 65 72 50 43 20 | 6e 61 74 69 76 65 20 63 |PowerPC |native c|
|00001700| 6f 64 65 20 66 6f 72 6d | 61 74 2c 20 74 68 65 6e |ode form|at, then|
|00001710| 20 79 6f 75 20 6e 65 65 | 64 20 74 6f 20 75 73 65 | you nee|d to use|
|00001720| 20 74 68 65 20 43 6f 6d | 70 6f 6e 65 6e 74 50 6c | the Com|ponentPl|
|00001730| 61 74 66 6f 72 6d 49 6e | 66 6f 20 77 69 74 68 69 |atformIn|fo withi|
|00001740| 6e 20 74 68 65 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |n the co|mponent |
|00001750| 72 65 73 6f 75 72 63 65 | 20 73 74 72 75 63 74 75 |resource| structu|
|00001760| 72 65 2e 20 54 68 65 6e | 20 73 65 74 20 74 68 69 |re. Then| set thi|
|00001770| 73 20 62 69 74 20 69 6e | 20 74 68 65 20 63 6f 6d |s bit in| the com|
|00001780| 70 6f 6e 65 6e 74 52 65 | 67 69 73 74 65 72 46 6c |ponentRe|gisterFl|
|00001790| 61 67 73 20 66 69 65 6c | 64 2e 20 49 66 20 74 68 |ags fiel|d. If th|
|000017a0| 69 73 20 62 69 74 20 69 | 73 20 6e 6f 74 20 73 65 |is bit i|s not se|
|000017b0| 74 20 74 68 65 6e 20 74 | 68 65 20 63 6f 64 65 20 |t then t|he code |
|000017c0| 69 73 20 61 73 73 75 6d | 65 64 20 74 6f 20 62 65 |is assum|ed to be|
|000017d0| 20 36 38 4b 20 66 6f 72 | 6d 61 74 2e 20 57 69 74 | 68K for|mat. Wit|
|000017e0| 68 6f 75 74 20 74 68 69 | 73 20 66 6c 61 67 20 62 |hout thi|s flag b|
|000017f0| 65 69 6e 67 20 73 65 74 | 2c 20 74 68 65 20 43 6f |eing set|, the Co|
|00001800| 6d 70 6f 6e 65 6e 74 20 | 4d 61 6e 61 67 65 72 20 |mponent |Manager |
|00001810| 77 69 6c 6c 20 69 67 6e | 6f 72 65 20 61 6e 79 20 |will ign|ore any |
|00001820| 43 6f 6d 70 6f 6e 65 6e | 74 50 6c 61 74 66 6f 72 |Componen|tPlatfor|
|00001830| 6d 49 6e 66 6f 2e 0d 63 | 6f 6d 70 6f 6e 65 6e 74 |mInfo..c|omponent|
|00001840| 49 63 6f 6e 46 61 6d 69 | 6c 79 20 0d 46 69 6e 61 |IconFami|ly .Fina|
|00001850| 6c 6c 79 2c 20 74 68 65 | 20 63 6f 6d 70 6f 6e 65 |lly, the| compone|
|00001860| 6e 74 49 63 6f 6e 46 61 | 6d 69 6c 79 20 66 69 65 |ntIconFa|mily fie|
|00001870| 6c 64 20 61 6c 6c 6f 77 | 73 20 79 6f 75 20 74 6f |ld allow|s you to|
|00001880| 20 70 72 6f 76 69 64 65 | 20 74 68 65 20 72 65 73 | provide| the res|
|00001890| 6f 75 72 63 65 20 49 44 | 20 6f 66 20 61 20 53 79 |ource ID| of a Sy|
|000018a0| 73 74 65 6d 20 37 20 49 | 63 6f 6e 20 53 75 69 74 |stem 7 I|con Suit|
|000018b0| 65 2e 20 49 66 20 74 68 | 69 73 20 66 69 65 6c 64 |e. If th|is field|
|000018c0| 20 69 73 20 30 2c 20 69 | 74 20 69 6e 64 69 63 61 | is 0, i|t indica|
|000018d0| 74 65 73 20 74 68 61 74 | 20 74 68 65 72 65 20 69 |tes that| there i|
|000018e0| 73 20 6e 6f 20 69 63 6f | 6e 20 73 75 69 74 65 2e |s no ico|n suite.|
|000018f0| 0d 63 6f 75 6e 74 0d 54 | 68 69 73 20 69 73 20 74 |.count.T|his is t|
|00001900| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 65 6c 65 |he numbe|r of ele|
|00001910| 6d 65 6e 74 73 20 63 6f | 6e 74 61 69 6e 65 64 20 |ments co|ntained |
|00001920| 69 6e 20 74 68 65 20 43 | 6f 6d 70 6f 6e 65 6e 74 |in the C|omponent|
|00001930| 50 6c 61 74 66 6f 72 6d | 49 6e 66 6f 20 61 72 72 |Platform|Info arr|
|00001940| 61 79 2e 0d 70 6c 61 74 | 66 6f 72 6d 41 72 72 61 |ay..plat|formArra|
|00001950| 79 0d 54 68 69 73 20 69 | 73 20 61 6e 20 61 72 72 |y.This i|s an arr|
|00001960| 61 79 20 6f 66 20 65 6c | 65 6d 65 6e 74 73 20 74 |ay of el|ements t|
|00001970| 68 61 74 20 64 65 73 63 | 72 69 62 65 20 74 68 65 |hat desc|ribe the|
|00001980| 20 63 6f 64 65 20 74 6f | 20 62 65 20 75 73 65 64 | code to| be used|
|00001990| 20 66 6f 72 20 64 69 66 | 66 65 72 65 6e 74 20 70 | for dif|ferent p|
|000019a0| 6c 61 74 66 6f 72 6d 73 | 2e 20 49 66 20 74 68 65 |latforms|. If the|
|000019b0| 20 70 6c 61 74 66 6f 72 | 6d 20 69 73 20 66 6f 72 | platfor|m is for|
|000019c0| 20 36 38 4b 2c 20 74 68 | 65 6e 20 74 68 65 20 69 | 68K, th|en the i|
|000019d0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 77 69 74 68 69 |nformati|on withi|
|000019e0| 6e 20 74 68 69 73 20 65 | 6c 65 6d 65 6e 74 20 69 |n this e|lement i|
|000019f0| 73 20 61 20 63 6f 70 79 | 20 66 72 6f 6d 20 74 68 |s a copy| from th|
|00001a00| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 46 6c 61 67 73 |e compon|entFlags|
|00001a10| 20 6f 66 20 74 68 65 20 | 43 6f 6d 70 6f 6e 65 6e | of the |Componen|
|00001a20| 74 44 65 73 63 72 69 70 | 74 69 6f 6e 20 61 6e 64 |tDescrip|tion and|
|00001a30| 20 52 65 73 6f 75 72 63 | 65 53 70 65 63 20 6f 66 | Resourc|eSpec of|
|00001a40| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 43 6f | the ori|ginal Co|
|00001a50| 6d 70 6f 6e 65 6e 74 52 | 65 73 6f 75 72 63 65 20 |mponentR|esource |
|00001a60| 73 74 72 75 63 74 75 72 | 65 2e 20 54 68 69 73 20 |structur|e. This |
|00001a70| 69 6e 73 75 72 65 73 20 | 62 61 63 6b 77 61 72 64 |insures |backward|
|00001a80| 73 20 63 6f 6d 70 61 74 | 69 62 69 6c 69 74 79 20 |s compat|ibility |
|00001a90| 77 69 74 68 20 6f 6c 64 | 65 72 20 43 6f 6d 70 6f |with old|er Compo|
|00001aa0| 6e 65 6e 74 20 4d 61 6e | 61 67 65 72 73 2e 20 49 |nent Man|agers. I|
|00001ab0| 66 20 74 68 65 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |f the co|mponent |
|00001ac0| 63 6f 6e 74 61 69 6e 73 | 20 6e 61 74 69 76 65 20 |contains| native |
|00001ad0| 63 6f 64 65 20 73 75 70 | 70 6f 72 74 20 66 6f 72 |code sup|port for|
|00001ae0| 20 74 68 65 20 50 6f 77 | 65 72 50 43 2c 20 74 68 | the Pow|erPC, th|
|00001af0| 65 6e 20 61 6e 20 65 6c | 65 6d 65 6e 74 20 6f 66 |en an el|ement of|
|00001b00| 20 74 68 65 20 61 72 72 | 61 79 20 77 69 6c 6c 20 | the arr|ay will |
|00001b10| 63 6f 6e 74 61 69 6e 20 | 74 68 65 20 69 6e 66 6f |contain |the info|
|00001b20| 72 6d 61 74 69 6f 6e 20 | 61 62 6f 75 74 20 69 74 |rmation |about it|
|00001b30| 73 20 63 6f 6d 70 6f 6e | 65 6e 74 46 6c 61 67 73 |s compon|entFlags|
|00001b40| 2c 20 72 65 73 6f 75 72 | 63 65 20 74 79 70 65 2c |, resour|ce type,|
|00001b50| 20 61 6e 64 20 72 65 73 | 6f 75 72 63 65 20 49 44 | and res|ource ID|
|00001b60| 2e 0d 54 68 65 20 70 6c | 61 74 66 6f 72 6d 54 79 |..The pl|atformTy|
|00001b70| 70 65 20 66 69 65 6c 64 | 20 69 73 20 61 20 76 61 |pe field| is a va|
|00001b80| 6c 75 65 20 74 68 61 74 | 20 72 65 70 72 65 73 65 |lue that| represe|
|00001b90| 6e 74 73 20 77 68 69 63 | 68 20 70 6c 61 74 66 6f |nts whic|h platfo|
|00001ba0| 72 6d 20 74 68 65 20 63 | 6f 6d 70 6f 6e 65 6e 74 |rm the c|omponent|
|00001bb0| 20 63 6f 64 65 20 69 73 | 20 74 6f 20 73 75 70 70 | code is| to supp|
|00001bc0| 6f 72 74 2e 20 54 68 65 | 20 47 65 73 74 61 6c 74 |ort. The| Gestalt|
|00001bd0| 20 72 65 73 75 6c 74 20 | 66 6f 72 20 73 65 6c 65 | result |for sele|
|00001be0| 63 74 6f 72 20 67 65 73 | 74 61 6c 74 53 79 73 41 |ctor ges|taltSysA|
|00001bf0| 72 63 68 69 74 65 63 74 | 75 72 65 20 77 69 6c 6c |rchitect|ure will|
|00001c00| 20 62 65 20 6d 61 74 63 | 68 65 64 20 77 69 74 68 | be matc|hed with|
|00001c10| 20 74 68 65 20 76 61 6c | 75 65 20 69 6e 20 70 6c | the val|ue in pl|
|00001c20| 61 74 66 6f 72 6d 54 79 | 70 65 20 6f 66 20 74 68 |atformTy|pe of th|
|00001c30| 65 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 6f 75 |e Compon|entResou|
|00001c40| 72 63 65 2e 20 49 66 20 | 61 20 6d 61 74 63 68 20 |rce. If |a match |
|00001c50| 69 73 20 66 6f 75 6e 64 | 2c 20 74 68 65 6e 20 74 |is found|, then t|
|00001c60| 68 61 74 20 63 6f 64 65 | 20 69 73 20 75 73 65 64 |hat code| is used|
|00001c70| 20 74 6f 20 73 75 70 70 | 6f 72 74 20 74 68 65 20 | to supp|ort the |
|00001c80| 67 69 76 65 6e 20 70 6c | 61 74 66 6f 72 6d 2e 0d |given pl|atform..|
|00001c90| 09 67 65 73 74 61 6c 74 | 36 38 6b 09 09 3d 20 31 |.gestalt|68k..= 1|
|00001ca0| 2c 09 09 09 2f 2a 20 4d | 6f 74 6f 72 6f 6c 61 20 |,.../* M|otorola |
|00001cb0| 4d 43 36 38 4b 20 61 72 | 63 68 69 74 65 63 74 75 |MC68K ar|chitectu|
|00001cc0| 72 65 20 2a 2f 0d 09 67 | 65 73 74 61 6c 74 50 6f |re */..g|estaltPo|
|00001cd0| 77 65 72 50 43 09 3d 20 | 32 2c 09 09 09 2f 2a 20 |werPC.= |2,.../* |
|00001ce0| 49 42 4d 20 50 6f 77 65 | 72 50 43 20 61 72 63 68 |IBM Powe|rPC arch|
|00001cf0| 69 74 65 63 74 75 72 65 | 20 2a 2f 0d 73 74 72 75 |itecture| */.stru|
|00001d00| 63 74 20 43 6f 6d 70 6f | 6e 65 6e 74 50 6c 61 74 |ct Compo|nentPlat|
|00001d10| 66 6f 72 6d 49 6e 66 6f | 0d 7b 0d 09 6c 6f 6e 67 |formInfo|.{..long|
|00001d20| 09 09 09 63 6f 6d 70 6f | 6e 65 6e 74 46 6c 61 67 |...compo|nentFlag|
|00001d30| 73 3b 09 2f 2a 20 66 6c | 61 67 73 20 6f 66 20 43 |s;./* fl|ags of C|
|00001d40| 6f 6d 70 6f 6e 65 6e 74 | 20 2a 2f 0d 09 52 65 73 |omponent| */..Res|
|00001d50| 6f 75 72 63 65 53 70 65 | 63 09 09 63 6f 6d 70 6f |ourceSpe|c..compo|
|00001d60| 6e 65 6e 74 3b 09 09 2f | 2a 20 72 65 73 6f 75 72 |nent;../|* resour|
|00001d70| 63 65 20 77 68 65 72 65 | 20 43 6f 6d 70 6f 6e 65 |ce where| Compone|
|00001d80| 6e 74 20 63 6f 64 65 20 | 09 09 09 09 09 09 09 20 |nt code |....... |
|00001d90| 20 20 69 73 20 66 6f 75 | 6e 64 20 2a 2f 0d 09 73 | is fou|nd */..s|
|00001da0| 68 6f 72 74 09 09 09 70 | 6c 61 74 66 6f 72 6d 54 |hort...p|latformT|
|00001db0| 79 70 65 3b 09 09 2f 2a | 20 67 65 73 74 61 6c 74 |ype;../*| gestalt|
|00001dc0| 53 79 73 41 72 63 68 69 | 74 65 63 74 75 72 65 20 |SysArchi|tecture |
|00001dd0| 72 65 73 75 6c 74 20 2a | 2f 0d 7d 3b 0d 43 6f 6d |result *|/.};.Com|
|00001de0| 70 6f 6e 65 6e 74 20 4d | 61 6e 61 67 65 72 20 76 |ponent M|anager v|
|00001df0| 65 72 73 69 6f 6e 20 33 | 20 72 6f 75 74 69 6e 65 |ersion 3| routine|
|00001e00| 73 0d 47 65 74 43 6f 6d | 70 6f 6e 65 6e 74 49 63 |s.GetCom|ponentIc|
|00001e10| 6f 6e 53 75 69 74 65 0d | 47 65 74 43 6f 6d 70 6f |onSuite.|GetCompo|
|00001e20| 6e 65 6e 74 49 63 6f 6e | 53 75 69 74 65 20 72 65 |nentIcon|Suite re|
|00001e30| 74 75 72 6e 73 20 61 6e | 20 49 63 6f 6e 20 53 75 |turns an| Icon Su|
|00001e40| 69 74 65 20 66 6f 72 20 | 74 68 65 20 67 69 76 65 |ite for |the give|
|00001e50| 6e 20 63 6f 6d 70 6f 6e | 65 6e 74 2e 20 54 68 69 |n compon|ent. Thi|
|00001e60| 73 20 63 61 6c 6c 20 77 | 6f 72 6b 73 20 6f 6e 6c |s call w|orks onl|
|00001e70| 79 20 75 6e 64 65 72 20 | 53 79 73 74 65 6d 20 37 |y under |System 7|
|00001e80| 20 6f 72 20 6c 61 74 65 | 72 2e 20 49 66 20 63 61 | or late|r. If ca|
|00001e90| 6c 6c 65 64 20 6f 6e 20 | 53 79 73 74 65 6d 20 36 |lled on |System 6|
|00001ea0| 2c 20 69 74 20 72 65 74 | 75 72 6e 73 20 61 6e 20 |, it ret|urns an |
|00001eb0| 65 72 72 6f 72 2e 20 49 | 66 20 74 68 65 20 63 6f |error. I|f the co|
|00001ec0| 6d 70 6f 6e 65 6e 74 20 | 64 6f 65 73 6e d5 74 20 |mponent |doesn.t |
|00001ed0| 68 61 76 65 20 61 6e 20 | 49 63 6f 6e 20 53 75 69 |have an |Icon Sui|
|00001ee0| 74 65 20 62 75 74 20 64 | 6f 65 73 20 68 61 76 65 |te but d|oes have|
|00001ef0| 20 61 20 43 6f 6d 70 6f | 6e 65 6e 74 20 49 63 6f | a Compo|nent Ico|
|00001f00| 6e 20 28 61 73 20 72 65 | 74 75 72 6e 65 64 20 62 |n (as re|turned b|
|00001f10| 79 20 47 65 74 43 6f 6d | 70 6f 6e 65 6e 74 49 6e |y GetCom|ponentIn|
|00001f20| 66 6f 29 2c 20 47 65 74 | 43 6f 6d 70 6f 6e 65 6e |fo), Get|Componen|
|00001f30| 74 49 63 6f 6e 53 75 69 | 74 65 20 63 72 65 61 74 |tIconSui|te creat|
|00001f40| 65 73 20 61 6e 20 49 63 | 6f 6e 20 53 75 69 74 65 |es an Ic|on Suite|
|00001f50| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 6a 75 73 74 | contain|ing just|
|00001f60| 20 74 68 65 20 62 6c 61 | 63 6b 2d 61 6e 64 2d 77 | the bla|ck-and-w|
|00001f70| 68 69 74 65 20 43 6f 6d | 70 6f 6e 65 6e 74 20 49 |hite Com|ponent I|
|00001f80| 63 6f 6e 2e 20 49 6e 20 | 74 68 69 73 20 77 61 79 |con. In |this way|
|00001f90| 2c 20 79 6f 75 20 63 61 | 6e 20 75 73 65 20 47 65 |, you ca|n use Ge|
|00001fa0| 74 43 6f 6d 70 6f 6e 65 | 6e 74 49 63 6f 6e 53 75 |tCompone|ntIconSu|
|00001fb0| 69 74 65 20 77 68 65 74 | 68 65 72 20 6f 72 20 6e |ite whet|her or n|
|00001fc0| 6f 74 20 61 20 63 6f 6d | 70 6f 6e 65 6e 74 20 68 |ot a com|ponent h|
|00001fd0| 61 73 20 61 6e 20 49 63 | 6f 6e 20 53 75 69 74 65 |as an Ic|on Suite|
|00001fe0| 2e 0d 70 61 73 63 61 6c | 20 4f 53 45 72 72 20 47 |..pascal| OSErr G|
|00001ff0| 65 74 43 6f 6d 70 6f 6e | 65 6e 74 49 63 6f 6e 53 |etCompon|entIconS|
|00002000| 75 69 74 65 28 43 6f 6d | 70 6f 6e 65 6e 74 20 61 |uite(Com|ponent a|
|00002010| 43 6f 6d 70 6f 6e 65 6e | 74 2c 20 48 61 6e 64 6c |Componen|t, Handl|
|00002020| 65 20 2a 69 63 6f 6e 53 | 75 69 74 65 29 0d 61 43 |e *iconS|uite).aC|
|00002030| 6f 6d 70 6f 6e 65 6e 74 | 09 43 6f 6d 70 6f 6e 65 |omponent|.Compone|
|00002040| 6e 74 20 49 44 2c 20 72 | 65 74 72 69 65 76 65 64 |nt ID, r|etrieved|
|00002050| 20 77 69 74 68 20 46 69 | 6e 64 4e 65 78 74 43 6f | with Fi|ndNextCo|
|00002060| 6d 70 6f 6e 65 6e 74 2e | 0d 69 63 6f 6e 53 75 69 |mponent.|.iconSui|
|00002070| 74 65 09 50 6f 69 6e 74 | 65 72 20 74 6f 20 74 68 |te.Point|er to th|
|00002080| 65 20 49 63 6f 6e 20 53 | 75 69 74 65 20 79 6f 75 |e Icon S|uite you|
|00002090| 20 77 69 6c 6c 20 72 65 | 63 65 69 76 65 2e 0d 52 | will re|ceive..R|
|000020a0| 65 67 69 73 74 65 72 43 | 6f 6d 70 6f 6e 65 6e 74 |egisterC|omponent|
|000020b0| 0d 52 65 67 69 73 74 65 | 72 43 6f 6d 70 6f 6e 65 |.Registe|rCompone|
|000020c0| 6e 74 52 65 73 6f 75 72 | 63 65 0d 52 65 67 69 73 |ntResour|ce.Regis|
|000020d0| 74 65 72 43 6f 6d 70 6f | 6e 65 6e 74 52 65 73 6f |terCompo|nentReso|
|000020e0| 75 72 63 65 46 69 6c 65 | 0d 54 68 65 20 6f 6e 6c |urceFile|.The onl|
|000020f0| 79 20 63 68 61 6e 67 65 | 20 6d 61 64 65 20 74 6f |y change| made to|
|00002100| 20 74 68 65 73 65 20 72 | 6f 75 74 69 6e 65 73 20 | these r|outines |
|00002110| 77 61 73 20 74 6f 20 6d | 6f 64 69 66 79 20 74 68 |was to m|odify th|
|00002120| 65 20 75 73 65 20 6f 66 | 20 74 68 65 20 67 6c 6f |e use of| the glo|
|00002130| 62 61 6c 20 70 61 72 61 | 6d 65 74 65 72 2e 20 54 |bal para|meter. T|
|00002140| 68 65 20 75 70 70 65 72 | 20 62 79 74 65 20 6e 6f |he upper| byte no|
|00002150| 77 20 63 6f 6e 74 61 69 | 6e 73 20 74 68 65 20 70 |w contai|ns the p|
|00002160| 6c 61 74 66 6f 72 6d 20 | 49 44 20 74 6f 20 62 65 |latform |ID to be|
|00002170| 20 75 73 65 64 20 62 79 | 20 74 68 65 20 63 6f 6d | used by| the com|
|00002180| 70 6f 6e 65 6e 74 20 62 | 65 69 6e 67 20 72 65 67 |ponent b|eing reg|
|00002190| 69 73 74 65 72 65 64 2e | 20 54 68 69 73 20 63 68 |istered.| This ch|
|000021a0| 61 6e 67 65 20 69 73 20 | 6e 65 63 65 73 73 61 72 |ange is |necessar|
|000021b0| 79 20 62 65 63 61 75 73 | 65 20 74 68 65 73 65 20 |y becaus|e these |
|000021c0| 63 61 6c 6c 73 20 64 6f | 20 6e 6f 74 20 68 61 76 |calls do| not hav|
|000021d0| 65 20 61 63 63 65 73 73 | 20 74 6f 20 74 68 65 20 |e access| to the |
|000021e0| 43 6f 6d 70 6f 6e 65 6e | 74 52 65 73 6f 75 72 63 |Componen|tResourc|
|000021f0| 65 20 77 68 69 63 68 20 | 63 6f 6e 74 61 69 6e 73 |e which |contains|
|00002200| 20 74 68 65 20 43 6f 6d | 70 6f 6e 65 6e 74 50 6c | the Com|ponentPl|
|00002210| 61 74 66 6f 72 6d 49 6e | 66 6f 2e 20 49 66 20 74 |atformIn|fo. If t|
|00002220| 68 65 20 75 70 70 65 72 | 20 62 79 74 65 20 6f 66 |he upper| byte of|
|00002230| 20 74 68 65 20 67 6c 6f | 62 61 6c 20 70 61 72 61 | the glo|bal para|
|00002240| 6d 65 74 65 72 20 69 73 | 20 7a 65 72 6f 2c 20 74 |meter is| zero, t|
|00002250| 68 65 6e 20 74 68 65 20 | 70 6c 61 74 66 6f 72 6d |hen the |platform|
|00002260| 20 69 73 20 61 73 73 75 | 6d 65 64 20 74 6f 20 62 | is assu|med to b|
|00002270| 65 20 74 68 65 20 70 6c | 61 74 66 6f 72 6d 36 38 |e the pl|atform68|
|00002280| 6b 2e 0d 48 6f 77 20 74 | 6f 20 63 72 65 61 74 65 |k..How t|o create|
|00002290| 20 61 20 50 6f 77 65 72 | 50 43 20 43 6f 6d 70 6f | a Power|PC Compo|
|000022a0| 6e 65 6e 74 52 65 73 6f | 75 72 63 65 0d 54 68 65 |nentReso|urce.The|
|000022b0| 20 62 61 73 69 63 73 20 | 73 74 65 70 20 66 6f 72 | basics |step for|
|000022c0| 20 72 75 6e 6e 69 6e 67 | 20 6f 6e 20 61 20 50 6f | running| on a Po|
|000022d0| 77 65 72 20 4d 61 63 69 | 6e 74 6f 73 68 20 77 69 |wer Maci|ntosh wi|
|000022e0| 74 68 20 61 20 6e 61 74 | 69 76 65 20 63 6f 6d 70 |th a nat|ive comp|
|000022f0| 6f 6e 65 6e 74 20 61 72 | 65 3a 0d a5 20 20 43 72 |onent ar|e:.. Cr|
|00002300| 65 61 74 65 20 63 6f 6d | 70 6f 6e 65 6e 74 20 63 |eate com|ponent c|
|00002310| 6f 64 65 20 66 72 61 67 | 6d 65 6e 74 20 77 69 74 |ode frag|ment wit|
|00002320| 68 20 6e 61 74 69 76 65 | 20 50 6f 77 65 72 50 43 |h native| PowerPC|
|00002330| 20 63 6f 64 65 0d a5 20 | 20 4d 61 69 6e 20 65 6e | code.. | Main en|
|00002340| 74 72 79 20 70 6f 69 6e | 74 20 74 6f 20 63 6f 64 |try poin|t to cod|
|00002350| 65 20 69 73 20 61 20 6d | 69 78 65 64 20 6d 6f 64 |e is a m|ixed mod|
|00002360| 65 20 72 6f 75 74 69 6e | 65 20 64 65 73 63 72 69 |e routin|e descri|
|00002370| 70 74 6f 72 0d a5 20 20 | 50 61 63 6b 61 67 65 20 |ptor.. |Package |
|00002380| 63 6f 6d 70 6f 6e 65 6e | 74 20 63 6f 64 65 20 66 |componen|t code f|
|00002390| 72 61 67 6d 65 6e 74 20 | 61 73 20 61 20 72 65 73 |ragment |as a res|
|000023a0| 6f 75 72 63 65 0d a5 20 | 20 49 66 20 79 6f 75 20 |ource.. | If you |
|000023b0| 73 75 70 70 6c 79 20 61 | 6e 20 69 6e 74 65 72 66 |supply a|n interf|
|000023c0| 61 63 65 20 66 6f 72 20 | 74 68 65 20 63 6f 6d 70 |ace for |the comp|
|000023d0| 6f 6e 65 6e 74 20 74 6f | 20 62 65 20 63 61 6c 6c |onent to| be call|
|000023e0| 65 64 20 64 69 72 65 63 | 74 6c 79 2c 20 74 68 65 |ed direc|tly, the|
|000023f0| 6e 20 66 6f 72 20 50 6f | 77 65 72 50 43 20 63 6f |n for Po|werPC co|
|00002400| 64 65 20 74 6f 20 20 20 | 20 0d 20 20 20 63 61 6c |de to | . cal|
|00002410| 6c 20 79 6f 75 72 20 63 | 6f 6d 70 6f 6e 65 6e 74 |l your c|omponent|
|00002420| 20 79 6f 75 20 6d 75 73 | 74 20 70 72 6f 76 69 64 | you mus|t provid|
|00002430| 65 20 63 75 73 74 6f 6d | 20 67 6c 75 65 20 74 6f |e custom| glue to|
|00002440| 20 6d 61 6b 65 20 74 68 | 65 20 63 61 6c 6c 2e 0d | make th|e call..|
|00002450| a5 20 20 43 72 65 61 74 | 65 20 74 68 65 20 65 78 |. Creat|e the ex|
|00002460| 74 65 6e 64 65 64 20 27 | 74 68 6e 67 27 20 72 65 |tended '|thng' re|
|00002470| 73 6f 75 72 63 65 20 75 | 73 69 6e 67 20 74 68 65 |source u|sing the|
|00002480| 20 43 6f 6d 70 6f 6e 65 | 6e 74 50 6c 61 74 66 6f | Compone|ntPlatfo|
|00002490| 72 6d 49 6e 66 6f 0d 45 | 61 63 68 20 6f 66 20 74 |rmInfo.E|ach of t|
|000024a0| 68 65 73 65 20 73 74 65 | 70 73 20 61 72 65 20 64 |hese ste|ps are d|
|000024b0| 69 73 63 75 73 73 65 64 | 20 69 6e 20 6d 6f 72 65 |iscussed| in more|
|000024c0| 20 64 65 74 61 69 6c 20 | 62 65 6c 6f 77 3a 0d 43 | detail |below:.C|
|000024d0| 72 65 61 74 69 6e 67 20 | 74 68 65 20 63 6f 6d 70 |reating |the comp|
|000024e0| 6f 6e 65 6e 74 20 63 6f | 64 65 20 66 72 61 67 6d |onent co|de fragm|
|000024f0| 65 6e 74 0d 54 68 65 20 | 66 69 72 73 74 20 73 74 |ent.The |first st|
|00002500| 65 70 20 69 6e 20 63 72 | 65 61 74 69 6e 67 20 61 |ep in cr|eating a|
|00002510| 20 6e 61 74 69 76 65 20 | 50 6f 77 65 72 50 43 20 | native |PowerPC |
|00002520| 63 6f 6d 70 6f 6e 65 6e | 74 20 69 73 20 74 6f 20 |componen|t is to |
|00002530| 70 6f 72 74 20 79 6f 75 | 72 20 63 6f 64 65 2e 20 |port you|r code. |
|00002540| 20 46 6f 72 20 63 6f 6d | 70 6c 65 74 65 20 64 65 | For com|plete de|
|00002550| 74 61 69 6c 73 20 6f 6e | 20 70 6f 72 74 69 6e 67 |tails on| porting|
|00002560| 20 74 6f 20 50 6f 77 65 | 72 50 43 2c 20 73 65 65 | to Powe|rPC, see|
|00002570| 20 49 6e 73 69 64 65 20 | 4d 61 63 69 6e 74 6f 73 | Inside |Macintos|
|00002580| 68 3a 20 50 6f 77 65 72 | 50 43 20 53 79 73 74 65 |h: Power|PC Syste|
|00002590| 6d 20 53 6f 66 74 77 61 | 72 65 2e 20 20 45 73 70 |m Softwa|re. Esp|
|000025a0| 65 63 69 61 6c 6c 79 20 | 69 6d 70 6f 72 74 61 6e |ecially |importan|
|000025b0| 74 20 66 6f 72 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |t for th|e follow|
|000025c0| 69 6e 67 20 64 69 73 63 | 75 73 73 69 6f 6e 20 69 |ing disc|ussion i|
|000025d0| 73 20 61 6e 20 75 6e 64 | 65 72 73 74 61 6e 64 69 |s an und|erstandi|
|000025e0| 6e 67 20 6f 66 20 74 68 | 65 20 4d 69 78 65 64 20 |ng of th|e Mixed |
|000025f0| 4d 6f 64 65 20 61 6e 64 | 20 43 6f 64 65 20 46 72 |Mode and| Code Fr|
|00002600| 61 67 6d 65 6e 74 20 4d | 61 6e 61 67 65 72 73 2e |agment M|anagers.|
|00002610| 0d 4c 69 6b 65 20 6f 74 | 68 65 72 20 63 6f 64 65 |.Like ot|her code|
|00002620| 20 70 6f 72 74 65 64 20 | 66 6f 72 20 50 6f 77 65 | ported |for Powe|
|00002630| 72 50 43 2c 20 61 6e 79 | 74 69 6d 65 20 79 6f 75 |rPC, any|time you|
|00002640| 72 20 63 6f 64 65 20 75 | 73 65 73 20 61 20 63 61 |r code u|ses a ca|
|00002650| 6c 6c 62 61 63 6b 20 66 | 75 6e 63 74 69 6f 6e 20 |llback f|unction |
|00002660| 28 50 72 6f 63 50 74 72 | 29 2c 20 69 74 20 6d 75 |(ProcPtr|), it mu|
|00002670| 73 74 20 62 65 20 63 6f | 6e 76 65 72 74 65 64 20 |st be co|nverted |
|00002680| 74 6f 20 61 20 55 6e 69 | 76 65 72 73 61 6c 50 72 |to a Uni|versalPr|
|00002690| 6f 63 50 74 72 2e 20 20 | 42 75 74 20 75 6e 6c 69 |ocPtr. |But unli|
|000026a0| 6b 65 20 63 61 6c 6c 62 | 61 63 6b 73 20 64 65 66 |ke callb|acks def|
|000026b0| 69 6e 65 64 20 62 79 20 | 74 68 65 20 73 79 73 74 |ined by |the syst|
|000026c0| 65 6d 2c 20 63 61 6c 6c | 62 61 63 6b 73 20 74 6f |em, call|backs to|
|000026d0| 20 79 6f 75 72 20 63 6f | 6d 70 6f 6e 65 6e 74 20 | your co|mponent |
|000026e0| 68 61 76 65 20 74 68 65 | 69 72 20 6f 77 6e 20 66 |have the|ir own f|
|000026f0| 75 6e 63 74 69 6f 6e 20 | 70 72 6f 74 6f 74 79 70 |unction |prototyp|
|00002700| 65 73 2e 20 20 57 69 74 | 68 20 74 68 65 20 65 78 |es. Wit|h the ex|
|00002710| 63 65 70 74 69 6f 6e 20 | 6f 66 20 73 6f 6d 65 20 |ception |of some |
|00002720| 63 61 6c 6c 62 61 63 6b | 73 20 64 65 66 69 6e 65 |callback|s define|
|00002730| 64 20 66 6f 72 20 51 75 | 69 63 6b 54 69 6d 65 20 |d for Qu|ickTime |
|00002740| 63 6f 6d 70 6f 6e 65 6e | 74 73 2c 20 74 68 65 72 |componen|ts, ther|
|00002750| 65 20 61 72 65 20 6e 6f | 20 73 79 73 74 65 6d 20 |e are no| system |
|00002760| 73 75 70 70 6c 69 65 64 | 20 66 75 6e 63 74 69 6f |supplied| functio|
|00002770| 6e 20 70 72 6f 74 6f 74 | 79 70 65 73 20 6f 72 20 |n protot|ypes or |
|00002780| 55 6e 69 76 65 72 73 61 | 6c 50 72 6f 63 50 74 72 |Universa|lProcPtr|
|00002790| 73 2c 20 73 6f 20 79 6f | 75 20 6d 75 73 74 20 63 |s, so yo|u must c|
|000027a0| 72 65 61 74 65 20 74 68 | 65 73 65 20 79 6f 75 72 |reate th|ese your|
|000027b0| 73 65 6c 66 2e 0d 49 66 | 2c 20 69 6e 20 72 65 73 |self..If|, in res|
|000027c0| 70 6f 6e 73 65 20 74 6f | 20 61 20 72 65 71 75 65 |ponse to| a reque|
|000027d0| 73 74 20 63 6f 64 65 2c | 20 79 6f 75 72 20 63 6f |st code,| your co|
|000027e0| 6d 70 6f 6e 65 6e 74 20 | 64 69 73 70 61 74 63 68 |mponent |dispatch|
|000027f0| 65 73 20 74 6f 20 69 6e | 74 65 72 6e 61 6c 20 66 |es to in|ternal f|
|00002800| 75 6e 63 74 69 6f 6e 73 | 20 75 73 69 6e 67 20 43 |unctions| using C|
|00002810| 61 6c 6c 43 6f 6d 70 6f | 6e 65 6e 74 46 75 6e 63 |allCompo|nentFunc|
|00002820| 74 69 6f 6e 20 6f 72 20 | 43 61 6c 6c 43 6f 6d 70 |tion or |CallComp|
|00002830| 6f 6e 65 6e 74 46 75 6e | 63 74 69 6f 6e 57 69 74 |onentFun|ctionWit|
|00002840| 68 53 74 6f 72 61 67 65 | 2c 20 74 68 65 6e 20 74 |hStorage|, then t|
|00002850| 68 69 73 20 69 73 20 61 | 20 70 6c 61 63 65 20 77 |his is a| place w|
|00002860| 68 65 72 65 20 79 6f 75 | 20 6d 75 73 74 20 75 73 |here you| must us|
|00002870| 65 20 61 20 55 6e 69 76 | 65 72 73 61 6c 50 72 6f |e a Univ|ersalPro|
|00002880| 63 50 74 72 2e 0d 53 75 | 70 70 6f 73 65 20 79 6f |cPtr..Su|ppose yo|
|00002890| 75 72 20 63 6f 6d 70 6f | 6e 65 6e 74 20 63 75 72 |ur compo|nent cur|
|000028a0| 72 65 6e 74 6c 79 20 72 | 65 73 70 6f 6e 64 73 20 |rently r|esponds |
|000028b0| 74 6f 20 61 6e 20 6f 70 | 65 6e 20 72 65 71 75 65 |to an op|en reque|
|000028c0| 73 74 20 61 73 20 66 6f | 6c 6c 6f 77 73 3a 0d 09 |st as fo|llows:..|
|000028d0| 73 77 69 74 63 68 20 28 | 70 61 72 61 6d 73 2d 3e |switch (|params->|
|000028e0| 77 68 61 74 29 0d 09 7b | 0d 09 20 20 20 20 63 61 |what)..{|.. ca|
|000028f0| 73 65 20 6b 43 6f 6d 70 | 6f 6e 65 6e 74 4f 70 65 |se kComp|onentOpe|
|00002900| 6e 53 65 6c 65 63 74 3a | 09 2f 2a 20 4f 70 65 6e |nSelect:|./* Open|
|00002910| 20 72 65 71 75 65 73 74 | 20 2a 2f 0d 09 20 20 20 | request| */.. |
|00002920| 20 7b 0d 09 09 72 65 73 | 75 6c 74 20 3d 20 43 61 | {...res|ult = Ca|
|00002930| 6c 6c 43 6f 6d 70 6f 6e | 65 6e 74 46 75 6e 63 74 |llCompon|entFunct|
|00002940| 69 6f 6e 57 69 74 68 53 | 74 6f 72 61 67 65 20 28 |ionWithS|torage (|
|00002950| 73 74 6f 72 61 67 65 2c | 20 70 61 72 61 6d 73 2c |storage,| params,|
|00002960| 20 4d 79 4f 70 65 6e 29 | 3b 0d 09 09 62 72 65 61 | MyOpen)|;...brea|
|00002970| 6b 3b 0d 09 20 20 20 20 | 7d 0d 4d 79 4f 70 65 6e |k;.. |}.MyOpen|
|00002980| 20 69 73 20 61 6e 20 69 | 6e 74 65 72 6e 61 6c 20 | is an i|nternal |
|00002990| 66 75 6e 63 74 69 6f 6e | 20 63 61 6c 6c 62 61 63 |function| callbac|
|000029a0| 6b 2c 20 73 6f 20 79 6f | 75 20 6d 75 73 74 20 63 |k, so yo|u must c|
|000029b0| 72 65 61 74 65 20 61 20 | 52 6f 75 74 69 6e 65 44 |reate a |RoutineD|
|000029c0| 65 73 63 72 69 70 74 6f | 72 2f 55 6e 69 76 65 72 |escripto|r/Univer|
|000029d0| 73 61 6c 50 72 6f 63 50 | 74 72 20 66 6f 72 20 69 |salProcP|tr for i|
|000029e0| 74 2e 20 20 4d 79 4f 70 | 65 6e 20 69 73 20 64 65 |t. MyOp|en is de|
|000029f0| 63 6c 61 72 65 64 20 61 | 73 20 66 6f 6c 6c 6f 77 |clared a|s follow|
|00002a00| 73 3a 0d 70 61 73 63 61 | 6c 20 43 6f 6d 70 6f 6e |s:.pasca|l Compon|
|00002a10| 65 6e 74 52 65 73 75 6c | 74 20 4d 79 4f 70 65 6e |entResul|t MyOpen|
|00002a20| 20 28 48 61 6e 64 6c 65 | 20 73 74 6f 72 61 67 65 | (Handle| storage|
|00002a30| 2c 20 43 6f 6d 70 6f 6e | 65 6e 74 49 6e 73 74 61 |, Compon|entInsta|
|00002a40| 6e 63 65 20 73 65 6c 66 | 29 3b 0d 54 68 65 20 66 |nce self|);.The f|
|00002a50| 69 72 73 74 20 73 74 65 | 70 20 69 73 20 74 6f 20 |irst ste|p is to |
|00002a60| 63 72 65 61 74 65 20 61 | 20 50 72 6f 63 49 6e 66 |create a| ProcInf|
|00002a70| 6f 20 76 61 6c 75 65 20 | 66 6f 72 20 74 68 69 73 |o value |for this|
|00002a80| 20 66 75 6e 63 74 69 6f | 6e 3a 0d 65 6e 75 6d 20 | functio|n:.enum |
|00002a90| 7b 0d 20 20 20 75 70 70 | 4d 79 4f 70 65 6e 50 72 |{. upp|MyOpenPr|
|00002aa0| 6f 63 49 6e 66 6f 20 3d | 20 6b 50 61 73 63 61 6c |ocInfo =| kPascal|
|00002ab0| 53 74 61 63 6b 42 61 73 | 65 64 0d 09 7c 20 52 45 |StackBas|ed..| RE|
|00002ac0| 53 55 4c 54 5f 53 49 5a | 45 28 53 49 5a 45 5f 43 |SULT_SIZ|E(SIZE_C|
|00002ad0| 4f 44 45 28 73 69 7a 65 | 6f 66 28 43 6f 6d 70 6f |ODE(size|of(Compo|
|00002ae0| 6e 65 6e 74 52 65 73 75 | 6c 74 29 29 29 0d 09 7c |nentResu|lt)))..||
|00002af0| 20 53 54 41 43 4b 5f 52 | 4f 55 54 49 4e 45 5f 50 | STACK_R|OUTINE_P|
|00002b00| 41 52 41 4d 45 54 45 52 | 28 31 2c 20 53 49 5a 45 |ARAMETER|(1, SIZE|
|00002b10| 5f 43 4f 44 45 28 73 69 | 7a 65 6f 66 28 48 61 6e |_CODE(si|zeof(Han|
|00002b20| 64 6c 65 29 29 29 0d 09 | 7c 20 53 54 41 43 4b 5f |dle)))..|| STACK_|
|00002b30| 52 4f 55 54 49 4e 45 5f | 50 41 52 41 4d 45 54 45 |ROUTINE_|PARAMETE|
|00002b40| 52 28 32 2c 20 53 49 5a | 45 5f 43 4f 44 45 28 73 |R(2, SIZ|E_CODE(s|
|00002b50| 69 7a 65 6f 66 28 43 6f | 6d 70 6f 6e 65 6e 74 49 |izeof(Co|mponentI|
|00002b60| 6e 73 74 61 6e 63 65 29 | 29 29 0d 7d 3b 0d 4e 65 |nstance)|)).};.Ne|
|00002b70| 78 74 20 79 6f 75 20 6d | 75 73 74 20 75 70 64 61 |xt you m|ust upda|
|00002b80| 74 65 20 79 6f 75 72 20 | 73 6f 75 72 63 65 20 74 |te your |source t|
|00002b90| 6f 20 62 75 69 6c 64 20 | 61 20 55 6e 69 76 65 72 |o build |a Univer|
|00002ba0| 73 61 6c 50 72 6f 63 50 | 74 72 20 61 6e 64 20 75 |salProcP|tr and u|
|00002bb0| 73 65 20 69 74 2e 20 20 | 59 6f 75 20 63 6f 75 6c |se it. |You coul|
|00002bc0| 64 20 75 73 65 20 4e 65 | 77 52 6f 75 74 69 6e 65 |d use Ne|wRoutine|
|00002bd0| 44 65 73 63 72 69 70 74 | 6f 72 20 66 6f 72 20 74 |Descript|or for t|
|00002be0| 68 69 73 20 70 75 72 70 | 6f 73 65 2c 20 62 75 74 |his purp|ose, but|
|00002bf0| 20 74 68 65 20 64 69 73 | 61 64 76 61 6e 74 61 67 | the dis|advantag|
|00002c00| 65 20 69 73 20 74 68 61 | 74 20 63 72 65 61 74 65 |e is tha|t create|
|00002c10| 73 20 61 20 68 65 61 70 | 20 6f 62 6a 65 63 74 20 |s a heap| object |
|00002c20| 77 68 69 63 68 20 79 6f | 75 72 20 63 6f 6d 70 6f |which yo|ur compo|
|00002c30| 6e 65 6e 74 20 6d 75 73 | 74 20 64 69 73 70 6f 73 |nent mus|t dispos|
|00002c40| 65 20 6f 66 20 70 72 6f | 70 65 72 6c 79 2e 0d 41 |e of pro|perly..A|
|00002c50| 6e 20 61 6c 74 65 72 6e | 61 74 65 20 61 70 70 72 |n altern|ate appr|
|00002c60| 6f 61 63 68 20 69 73 20 | 74 6f 20 64 65 63 6c 61 |oach is |to decla|
|00002c70| 72 65 20 61 20 67 6c 6f | 62 61 6c 20 52 6f 75 74 |re a glo|bal Rout|
|00002c80| 69 6e 65 44 65 73 63 72 | 69 70 74 6f 72 20 28 67 |ineDescr|iptor (g|
|00002c90| 6c 6f 62 61 6c 20 76 61 | 72 69 61 62 6c 65 73 20 |lobal va|riables |
|00002ca0| 61 72 65 20 6e 6f 74 20 | 61 20 70 72 6f 62 6c 65 |are not |a proble|
|00002cb0| 6d 20 66 6f 72 20 61 20 | 6e 61 74 69 76 65 20 50 |m for a |native P|
|00002cc0| 6f 77 65 72 50 43 20 63 | 6f 6d 70 6f 6e 65 6e 74 |owerPC c|omponent|
|00002cd0| 2c 20 73 69 6e 63 65 20 | 61 20 63 6f 64 65 20 66 |, since |a code f|
|00002ce0| 72 61 67 6d 65 6e 74 20 | 61 75 74 6f 6d 61 74 69 |ragment |automati|
|00002cf0| 63 61 6c 6c 79 20 68 61 | 73 20 67 6c 6f 62 61 6c |cally ha|s global|
|00002d00| 20 76 61 72 69 61 62 6c | 65 73 29 3a 0d 23 69 66 | variabl|es):.#if|
|00002d10| 64 65 66 20 70 6f 77 65 | 72 63 0d 52 6f 75 74 69 |def powe|rc.Routi|
|00002d20| 6e 65 44 65 73 63 72 69 | 70 74 6f 72 20 4d 79 4f |neDescri|ptor MyO|
|00002d30| 70 65 6e 52 44 20 3d 20 | 42 55 49 4c 44 5f 52 4f |penRD = |BUILD_RO|
|00002d40| 55 54 49 4e 45 5f 44 45 | 53 43 52 49 50 54 4f 52 |UTINE_DE|SCRIPTOR|
|00002d50| 20 28 75 70 70 4d 79 4f | 70 65 6e 50 72 6f 63 49 | (uppMyO|penProcI|
|00002d60| 6e 66 6f 2c 20 4d 79 4f | 70 65 6e 29 3b 0d 23 65 |nfo, MyO|pen);.#e|
|00002d70| 6e 64 69 66 0d 49 66 20 | 79 6f 75 20 77 61 6e 74 |ndif.If |you want|
|00002d80| 20 79 6f 75 72 20 63 6f | 64 65 20 74 6f 20 62 65 | your co|de to be|
|00002d90| 20 63 6f 6d 70 69 6c 61 | 62 6c 65 20 66 6f 72 20 | compila|ble for |
|00002da0| 62 6f 74 68 20 36 38 4b | 20 61 6e 64 20 50 6f 77 |both 68K| and Pow|
|00002db0| 65 72 50 43 2c 20 75 73 | 69 6e 67 20 74 68 65 20 |erPC, us|ing the |
|00002dc0| 55 6e 69 76 65 72 73 61 | 6c 20 49 6e 74 65 72 66 |Universa|l Interf|
|00002dd0| 61 63 65 73 2c 20 74 68 | 65 6e 20 74 6f 20 61 76 |aces, th|en to av|
|00002de0| 6f 69 64 20 61 20 6c 6f | 74 20 6f 66 20 63 6f 6e |oid a lo|t of con|
|00002df0| 64 69 74 69 6f 6e 61 6c | 20 63 6f 6d 70 69 6c 61 |ditional| compila|
|00002e00| 74 69 6f 6e 2c 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |tion, th|e follow|
|00002e10| 69 6e 67 20 6d 61 63 72 | 6f 73 20 6d 61 79 20 62 |ing macr|os may b|
|00002e20| 65 20 75 73 65 66 75 6c | 3a 0d 23 69 66 64 65 66 |e useful|:.#ifdef|
|00002e30| 20 70 6f 77 65 72 63 0d | 23 64 65 66 69 6e 65 20 | powerc.|#define |
|00002e40| 43 61 6c 6c 43 6f 6d 70 | 6f 6e 65 6e 74 46 75 6e |CallComp|onentFun|
|00002e50| 63 74 69 6f 6e 57 69 74 | 68 53 74 6f 72 61 67 65 |ctionWit|hStorage|
|00002e60| 55 6e 69 76 28 73 74 6f | 72 61 67 65 2c 20 70 61 |Univ(sto|rage, pa|
|00002e70| 72 61 6d 73 2c 20 66 75 | 6e 63 4e 61 6d 65 29 20 |rams, fu|ncName) |
|00002e80| 5c 0d 20 20 20 43 61 6c | 6c 43 6f 6d 70 6f 6e 65 |\. Cal|lCompone|
|00002e90| 6e 74 46 75 6e 63 74 69 | 6f 6e 57 69 74 68 53 74 |ntFuncti|onWithSt|
|00002ea0| 6f 72 61 67 65 28 73 74 | 6f 72 61 67 65 2c 20 70 |orage(st|orage, p|
|00002eb0| 61 72 61 6d 73 2c 20 26 | 66 75 6e 63 4e 61 6d 65 |arams, &|funcName|
|00002ec0| 23 23 52 44 29 0d 23 64 | 65 66 69 6e 65 20 43 61 |##RD).#d|efine Ca|
|00002ed0| 6c 6c 43 6f 6d 70 6f 6e | 65 6e 74 46 75 6e 63 74 |llCompon|entFunct|
|00002ee0| 69 6f 6e 55 6e 69 76 28 | 70 61 72 61 6d 73 2c 20 |ionUniv(|params, |
|00002ef0| 66 75 6e 63 4e 61 6d 65 | 29 20 5c 0d 20 20 20 43 |funcName|) \. C|
|00002f00| 61 6c 6c 43 6f 6d 70 6f | 6e 65 6e 74 46 75 6e 63 |allCompo|nentFunc|
|00002f10| 74 69 6f 6e 28 70 61 72 | 61 6d 73 2c 20 26 66 75 |tion(par|ams, &fu|
|00002f20| 6e 63 4e 61 6d 65 23 23 | 52 44 29 0d 23 64 65 66 |ncName##|RD).#def|
|00002f30| 69 6e 65 20 49 4e 53 54 | 41 4e 54 49 41 54 45 5f |ine INST|ANTIATE_|
|00002f40| 52 4f 55 54 49 4e 45 5f | 44 45 53 43 52 49 50 54 |ROUTINE_|DESCRIPT|
|00002f50| 4f 52 28 66 75 6e 63 4e | 61 6d 65 29 20 52 6f 75 |OR(funcN|ame) Rou|
|00002f60| 74 69 6e 65 44 65 73 63 | 72 69 70 74 6f 72 20 66 |tineDesc|riptor f|
|00002f70| 75 6e 63 4e 61 6d 65 23 | 23 52 44 20 3d 20 5c 0d |uncName#|#RD = \.|
|00002f80| 20 20 20 42 55 49 4c 44 | 5f 52 4f 55 54 49 4e 45 | BUILD|_ROUTINE|
|00002f90| 5f 44 45 53 43 52 49 50 | 54 4f 52 20 28 75 70 70 |_DESCRIP|TOR (upp|
|00002fa0| 23 23 66 75 6e 63 4e 61 | 6d 65 23 23 50 72 6f 63 |##funcNa|me##Proc|
|00002fb0| 49 6e 66 6f 2c 20 66 75 | 6e 63 4e 61 6d 65 29 0d |Info, fu|ncName).|
|00002fc0| 23 65 6c 73 65 0d 23 64 | 65 66 69 6e 65 20 43 61 |#else.#d|efine Ca|
|00002fd0| 6c 6c 43 6f 6d 70 6f 6e | 65 6e 74 46 75 6e 63 74 |llCompon|entFunct|
|00002fe0| 69 6f 6e 57 69 74 68 53 | 74 6f 72 61 67 65 55 6e |ionWithS|torageUn|
|00002ff0| 69 76 28 73 74 6f 72 61 | 67 65 2c 20 70 61 72 61 |iv(stora|ge, para|
|00003000| 6d 73 2c 20 66 75 6e 63 | 4e 61 6d 65 29 20 5c 0d |ms, func|Name) \.|
|00003010| 20 20 20 43 61 6c 6c 43 | 6f 6d 70 6f 6e 65 6e 74 | CallC|omponent|
|00003020| 46 75 6e 63 74 69 6f 6e | 57 69 74 68 53 74 6f 72 |Function|WithStor|
|00003030| 61 67 65 28 73 74 6f 72 | 61 67 65 2c 20 70 61 72 |age(stor|age, par|
|00003040| 61 6d 73 2c 20 28 43 6f | 6d 70 6f 6e 65 6e 74 46 |ams, (Co|mponentF|
|00003050| 75 6e 63 74 69 6f 6e 55 | 50 50 29 66 75 6e 63 4e |unctionU|PP)funcN|
|00003060| 61 6d 65 29 0d 23 64 65 | 66 69 6e 65 20 43 61 6c |ame).#de|fine Cal|
|00003070| 6c 43 6f 6d 70 6f 6e 65 | 6e 74 46 75 6e 63 74 69 |lCompone|ntFuncti|
|00003080| 6f 6e 55 6e 69 76 28 70 | 61 72 61 6d 73 2c 20 66 |onUniv(p|arams, f|
|00003090| 75 6e 63 4e 61 6d 65 29 | 20 5c 0d 20 20 20 43 61 |uncName)| \. Ca|
|000030a0| 6c 6c 43 6f 6d 70 6f 6e | 65 6e 74 46 75 6e 63 74 |llCompon|entFunct|
|000030b0| 69 6f 6e 28 70 61 72 61 | 6d 73 2c 20 28 43 6f 6d |ion(para|ms, (Com|
|000030c0| 70 6f 6e 65 6e 74 46 75 | 6e 63 74 69 6f 6e 55 50 |ponentFu|nctionUP|
|000030d0| 50 29 66 75 6e 63 4e 61 | 6d 65 29 0d 23 65 6e 64 |P)funcNa|me).#end|
|000030e0| 69 66 0d 54 68 65 73 65 | 20 6d 61 63 72 6f 73 2c |if.These| macros,|
|000030f0| 20 65 78 61 63 74 6c 79 | 20 61 6e 61 6c 6f 67 6f | exactly| analogo|
|00003100| 75 73 20 74 6f 20 43 61 | 6c 6c 43 6f 6d 70 6f 6e |us to Ca|llCompon|
|00003110| 65 6e 74 46 75 6e 63 74 | 69 6f 6e 20 61 6e 64 20 |entFunct|ion and |
|00003120| 43 61 6c 6c 43 6f 6d 70 | 6f 6e 65 6e 74 46 75 6e |CallComp|onentFun|
|00003130| 63 74 69 6f 6e 57 69 74 | 68 53 74 6f 72 61 67 65 |ctionWit|hStorage|
|00003140| 2c 20 67 65 6e 65 72 61 | 74 65 20 74 68 65 20 61 |, genera|te the a|
|00003150| 70 70 72 6f 70 72 69 61 | 74 65 20 63 6f 64 65 20 |ppropria|te code |
|00003160| 77 68 65 6e 20 63 6f 6d | 70 69 6c 65 64 20 66 6f |when com|piled fo|
|00003170| 72 20 36 38 4b 20 61 6e | 64 20 50 6f 77 65 72 50 |r 68K an|d PowerP|
|00003180| 43 2e 20 20 4e 6f 74 65 | 20 74 68 61 74 20 74 68 |C. Note| that th|
|00003190| 65 20 50 6f 77 65 72 50 | 43 20 6d 61 63 72 6f 20 |e PowerP|C macro |
|000031a0| 65 78 70 61 6e 73 69 6f | 6e 20 64 65 70 65 6e 64 |expansio|n depend|
|000031b0| 73 20 6f 6e 20 74 68 65 | 20 67 6c 6f 62 61 6c 20 |s on the| global |
|000031c0| 52 6f 75 74 69 6e 65 44 | 65 73 63 72 69 70 74 6f |RoutineD|escripto|
|000031d0| 72 20 6e 61 6d 65 20 62 | 65 69 6e 67 20 46 75 6e |r name b|eing Fun|
|000031e0| 63 4e 61 6d 65 52 44 2c | 20 69 2e 65 2e 20 74 68 |cNameRD,| i.e. th|
|000031f0| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 20 66 75 |e name o|f the fu|
|00003200| 6e 63 74 69 6f 6e 20 77 | 69 74 68 20 52 44 20 61 |nction w|ith RD a|
|00003210| 70 70 65 6e 64 65 64 2e | 20 20 54 68 65 20 49 4e |ppended.| The IN|
|00003220| 53 54 41 4e 54 49 41 54 | 45 5f 52 4f 55 54 49 4e |STANTIAT|E_ROUTIN|
|00003230| 45 5f 44 45 53 43 52 49 | 50 54 4f 52 20 6d 61 63 |E_DESCRI|PTOR mac|
|00003240| 72 6f 20 63 61 6e 20 62 | 65 20 75 73 65 64 20 66 |ro can b|e used f|
|00003250| 6f 72 20 74 68 61 74 20 | 70 75 72 70 6f 73 65 3a |or that |purpose:|
|00003260| 0d 23 69 66 64 65 66 20 | 70 6f 77 65 72 63 0d 49 |.#ifdef |powerc.I|
|00003270| 4e 53 54 41 4e 54 49 41 | 54 45 5f 52 4f 55 54 49 |NSTANTIA|TE_ROUTI|
|00003280| 4e 45 5f 44 45 53 43 52 | 49 50 54 4f 52 28 4d 79 |NE_DESCR|IPTOR(My|
|00003290| 4f 70 65 6e 29 3b 0d 23 | 65 6e 64 69 66 0d 54 68 |Open);.#|endif.Th|
|000032a0| 69 73 20 69 73 20 69 64 | 65 6e 74 69 63 61 6c 20 |is is id|entical |
|000032b0| 74 6f 20 74 68 65 20 64 | 65 63 6c 61 72 61 74 69 |to the d|eclarati|
|000032c0| 6f 6e 20 6f 66 20 4d 79 | 4f 70 65 6e 52 44 20 65 |on of My|OpenRD e|
|000032d0| 61 72 6c 69 65 72 2c 20 | 62 75 74 20 73 69 6d 70 |arlier, |but simp|
|000032e0| 6c 69 66 69 65 73 20 74 | 68 65 20 65 64 69 74 69 |lifies t|he editi|
|000032f0| 6e 67 2e 0d 57 69 74 68 | 20 61 6c 6c 20 74 68 65 |ng..With| all the|
|00003300| 20 63 6f 6e 64 69 74 69 | 6f 6e 61 6c 20 73 74 75 | conditi|onal stu|
|00003310| 66 66 20 6f 75 74 20 6f | 66 20 74 68 65 20 77 61 |ff out o|f the wa|
|00003320| 79 2c 20 74 68 65 6e 20 | 74 68 65 20 6f 72 69 67 |y, then |the orig|
|00003330| 69 6e 61 6c 20 63 6f 64 | 65 20 63 61 6e 20 73 69 |inal cod|e can si|
|00003340| 6d 70 6c 79 20 62 65 20 | 75 70 64 61 74 65 64 20 |mply be |updated |
|00003350| 62 79 20 72 65 70 6c 61 | 63 69 6e 67 20 43 61 6c |by repla|cing Cal|
|00003360| 6c 43 6f 6d 70 6f 6e 65 | 6e 74 46 75 6e 63 74 69 |lCompone|ntFuncti|
|00003370| 6f 6e 57 69 74 68 53 74 | 6f 72 61 67 65 20 77 69 |onWithSt|orage wi|
|00003380| 74 68 20 43 61 6c 6c 43 | 6f 6d 70 6f 6e 65 6e 74 |th CallC|omponent|
|00003390| 46 75 6e 63 74 69 6f 6e | 57 69 74 68 53 74 6f 72 |Function|WithStor|
|000033a0| 61 67 65 55 6e 69 76 3a | 0d 09 73 77 69 74 63 68 |ageUniv:|..switch|
|000033b0| 20 28 70 61 72 61 6d 73 | 2d 3e 77 68 61 74 29 0d | (params|->what).|
|000033c0| 09 7b 0d 09 20 20 20 63 | 61 73 65 20 6b 43 6f 6d |.{.. c|ase kCom|
|000033d0| 70 6f 6e 65 6e 74 4f 70 | 65 6e 53 65 6c 65 63 74 |ponentOp|enSelect|
|000033e0| 3a 09 09 2f 2a 20 4f 70 | 65 6e 20 72 65 71 75 65 |:../* Op|en reque|
|000033f0| 73 74 20 2a 2f 0d 09 20 | 20 20 7b 0d 09 09 72 65 |st */.. | {...re|
|00003400| 73 75 6c 74 20 3d 20 43 | 61 6c 6c 43 6f 6d 70 6f |sult = C|allCompo|
|00003410| 6e 65 6e 74 46 75 6e 63 | 74 69 6f 6e 57 69 74 68 |nentFunc|tionWith|
|00003420| 53 74 6f 72 61 67 65 55 | 6e 69 76 28 73 74 6f 72 |StorageU|niv(stor|
|00003430| 61 67 65 2c 20 70 61 72 | 61 6d 73 2c 4d 79 4f 70 |age, par|ams,MyOp|
|00003440| 65 6e 29 3b 0d 09 09 62 | 72 65 61 6b 3b 0d 09 20 |en);...b|reak;.. |
|00003450| 20 20 7d 0d 52 65 70 65 | 61 74 20 74 68 65 20 61 | }.Repe|at the a|
|00003460| 62 6f 76 65 20 73 74 65 | 70 73 20 66 6f 72 20 61 |bove ste|ps for a|
|00003470| 6c 6c 20 69 6e 74 65 72 | 6e 61 6c 20 63 6f 6d 70 |ll inter|nal comp|
|00003480| 6f 6e 65 6e 74 20 64 69 | 73 70 61 74 63 68 65 73 |onent di|spatches|
|00003490| 20 79 6f 75 20 6d 61 6b | 65 2e 0d 53 65 74 74 69 | you mak|e..Setti|
|000034a0| 6e 67 20 74 68 65 20 6d | 61 69 6e 20 65 6e 74 72 |ng the m|ain entr|
|000034b0| 79 20 70 6f 69 6e 74 0d | 4c 61 73 74 6c 79 2c 20 |y point.|Lastly, |
|000034c0| 79 6f 75 20 6d 75 73 74 | 20 73 65 74 20 75 70 20 |you must| set up |
|000034d0| 74 68 65 20 65 6e 74 72 | 79 20 70 6f 69 6e 74 20 |the entr|y point |
|000034e0| 69 6e 74 6f 20 79 6f 75 | 72 20 63 6f 6d 70 6f 6e |into you|r compon|
|000034f0| 65 6e 74 20 63 6f 72 72 | 65 63 74 6c 79 2e 20 20 |ent corr|ectly. |
|00003500| 55 6e 6c 69 6b 65 20 61 | 20 36 38 4b 20 63 6f 64 |Unlike a| 68K cod|
|00003510| 65 20 72 65 73 6f 75 72 | 63 65 2c 20 61 20 50 6f |e resour|ce, a Po|
|00003520| 77 65 72 50 43 20 63 6f | 64 65 20 66 72 61 67 6d |werPC co|de fragm|
|00003530| 65 6e 74 20 28 77 68 69 | 63 68 20 79 6f 75 72 20 |ent (whi|ch your |
|00003540| 63 6f 6d 70 6f 6e 65 6e | 74 20 77 69 6c 6c 20 62 |componen|t will b|
|00003550| 65 29 20 68 61 73 20 61 | 20 77 65 6c 6c 20 64 65 |e) has a| well de|
|00003560| 66 69 6e 65 64 20 65 6e | 74 72 79 20 70 6f 69 6e |fined en|try poin|
|00003570| 74 2e 20 20 54 68 65 20 | 43 6f 6d 70 6f 6e 65 6e |t. The |Componen|
|00003580| 74 20 4d 61 6e 61 67 65 | 72 2c 20 72 61 74 68 65 |t Manage|r, rathe|
|00003590| 72 20 74 68 61 6e 20 6a | 75 73 74 20 6a 75 6d 70 |r than j|ust jump|
|000035a0| 69 6e 67 20 74 6f 20 74 | 68 65 20 73 74 61 72 74 |ing to t|he start|
|000035b0| 20 6f 66 20 74 68 65 20 | 63 6f 64 65 20 72 65 73 | of the |code res|
|000035c0| 6f 75 72 63 65 2c 20 77 | 69 6c 6c 20 63 61 6c 6c |ource, w|ill call|
|000035d0| 20 74 68 65 20 6d 61 69 | 6e 20 65 6e 74 72 79 20 | the mai|n entry |
|000035e0| 70 6f 69 6e 74 2c 20 61 | 73 20 64 65 66 69 6e 65 |point, a|s define|
|000035f0| 64 20 77 68 65 6e 20 6c | 69 6e 6b 69 6e 67 2c 20 |d when l|inking, |
|00003600| 69 6e 73 74 65 61 64 2e | 0d 42 75 74 20 74 68 65 |instead.|.But the|
|00003610| 20 43 6f 6d 70 6f 6e 65 | 6e 74 20 4d 61 6e 61 67 | Compone|nt Manag|
|00003620| 65 72 20 69 73 20 36 38 | 4b 20 63 6f 64 65 2c 20 |er is 68|K code, |
|00003630| 77 68 69 63 68 20 6d 65 | 61 6e 73 20 79 6f 75 72 |which me|ans your|
|00003640| 20 6d 61 69 6e 20 65 6e | 74 72 79 20 70 6f 69 6e | main en|try poin|
|00003650| 74 20 6d 75 73 74 20 62 | 65 20 61 20 52 6f 75 74 |t must b|e a Rout|
|00003660| 69 6e 65 44 65 73 63 72 | 69 70 74 6f 72 2e 20 20 |ineDescr|iptor. |
|00003670| 59 6f 75 20 63 61 6e 20 | 73 65 74 20 74 68 61 74 |You can |set that|
|00003680| 20 75 70 20 61 73 20 66 | 6f 6c 6c 6f 77 73 3a 0d | up as f|ollows:.|
|00003690| 70 61 73 63 61 6c 09 43 | 6f 6d 70 6f 6e 65 6e 74 |pascal.C|omponent|
|000036a0| 52 65 73 75 6c 74 09 6d | 61 69 6e 09 28 43 6f 6d |Result.m|ain.(Com|
|000036b0| 70 6f 6e 65 6e 74 50 61 | 72 61 6d 65 74 65 72 73 |ponentPa|rameters|
|000036c0| 09 2a 70 61 72 61 6d 73 | 2c 0d 09 09 09 09 09 20 |.*params|,...... |
|000036d0| 48 61 6e 64 6c 65 09 20 | 20 20 20 20 20 73 74 6f |Handle. | sto|
|000036e0| 72 61 67 65 29 3b 0d 23 | 69 66 64 65 66 20 70 6f |rage);.#|ifdef po|
|000036f0| 77 65 72 63 0d 65 6e 75 | 6d 20 7b 0d 09 75 70 70 |werc.enu|m {..upp|
|00003700| 4d 61 69 6e 50 72 6f 63 | 49 6e 66 6f 20 3d 20 6b |MainProc|Info = k|
|00003710| 50 61 73 63 61 6c 53 74 | 61 63 6b 42 61 73 65 64 |PascalSt|ackBased|
|00003720| 20 0d 09 09 7c 20 52 45 | 53 55 4c 54 5f 53 49 5a | ...| RE|SULT_SIZ|
|00003730| 45 28 53 49 5a 45 5f 43 | 4f 44 45 28 73 69 7a 65 |E(SIZE_C|ODE(size|
|00003740| 6f 66 28 43 6f 6d 70 6f | 6e 65 6e 74 52 65 73 75 |of(Compo|nentResu|
|00003750| 6c 74 29 29 29 20 0d 09 | 09 7c 20 53 54 41 43 4b |lt))) ..|.| STACK|
|00003760| 5f 52 4f 55 54 49 4e 45 | 5f 50 41 52 41 4d 45 54 |_ROUTINE|_PARAMET|
|00003770| 45 52 28 31 2c 20 53 49 | 5a 45 5f 43 4f 44 45 28 |ER(1, SI|ZE_CODE(|
|00003780| 73 69 7a 65 6f 66 28 43 | 6f 6d 70 6f 6e 65 6e 74 |sizeof(C|omponent|
|00003790| 50 61 72 61 6d 65 74 65 | 72 73 20 2a 29 29 29 20 |Paramete|rs *))) |
|000037a0| 0d 09 09 7c 20 53 54 41 | 43 4b 5f 52 4f 55 54 49 |...| STA|CK_ROUTI|
|000037b0| 4e 45 5f 50 41 52 41 4d | 45 54 45 52 28 32 2c 20 |NE_PARAM|ETER(2, |
|000037c0| 53 49 5a 45 5f 43 4f 44 | 45 28 73 69 7a 65 6f 66 |SIZE_COD|E(sizeof|
|000037d0| 28 48 61 6e 64 6c 65 29 | 29 29 0d 7d 3b 0d 52 6f |(Handle)|)).};.Ro|
|000037e0| 75 74 69 6e 65 44 65 73 | 63 72 69 70 74 6f 72 20 |utineDes|criptor |
|000037f0| 4d 61 69 6e 52 44 20 3d | 20 42 55 49 4c 44 5f 52 |MainRD =| BUILD_R|
|00003800| 4f 55 54 49 4e 45 5f 44 | 45 53 43 52 49 50 54 4f |OUTINE_D|ESCRIPTO|
|00003810| 52 28 75 70 70 4d 61 69 | 6e 50 72 6f 63 49 6e 66 |R(uppMai|nProcInf|
|00003820| 6f 2c 20 6d 61 69 6e 29 | 3b 0d 23 65 6e 64 69 66 |o, main)|;.#endif|
|00003830| 0d 57 68 65 6e 20 79 6f | 75 20 6c 69 6e 6b 20 74 |.When yo|u link t|
|00003840| 68 65 20 63 6f 6d 70 6f | 6e 65 6e 74 2c 20 79 6f |he compo|nent, yo|
|00003850| 75 20 6d 75 73 74 20 74 | 68 65 6e 20 73 70 65 63 |u must t|hen spec|
|00003860| 69 66 79 20 4d 61 69 6e | 52 44 20 61 73 20 74 68 |ify Main|RD as th|
|00003870| 65 20 65 6e 74 72 79 20 | 70 6f 69 6e 74 2e 0d 4e |e entry |point..N|
|00003880| 6f 74 65 3a 09 59 6f 75 | 72 20 64 65 76 65 6c 6f |ote:.You|r develo|
|00003890| 70 6d 65 6e 74 20 65 6e | 76 69 72 6f 6e 6d 65 6e |pment en|vironmen|
|000038a0| 74 20 6d 61 79 20 69 73 | 73 75 65 20 61 20 77 61 |t may is|sue a wa|
|000038b0| 72 6e 69 6e 67 20 62 65 | 63 61 75 73 65 20 79 6f |rning be|cause yo|
|000038c0| 75 72 20 6d 61 69 6e 20 | 65 6e 74 72 79 20 70 6f |ur main |entry po|
|000038d0| 69 6e 74 20 69 73 20 69 | 6e 20 61 20 64 61 74 61 |int is i|n a data|
|000038e0| 20 73 65 63 74 69 6f 6e | 2c 20 6e 6f 74 20 61 20 | section|, not a |
|000038f0| 63 6f 64 65 20 73 65 63 | 74 69 6f 6e 2e 20 20 59 |code sec|tion. Y|
|00003900| 6f 75 20 6d 61 79 20 69 | 67 6e 6f 72 65 20 74 68 |ou may i|gnore th|
|00003910| 65 20 77 61 72 6e 69 6e | 67 2e 0d 4e 6f 74 65 3a |e warnin|g..Note:|
|00003920| 09 49 66 20 79 6f 75 72 | 20 63 6f 64 65 20 69 73 |.If your| code is|
|00003930| 20 64 65 70 65 6e 64 65 | 6e 74 20 6f 6e 20 43 20 | depende|nt on C |
|00003940| 6f 72 20 43 2b 2b 20 72 | 75 6e 74 69 6d 65 20 69 |or C++ r|untime i|
|00003950| 6e 69 74 69 61 6c 69 7a | 61 74 69 6f 6e 73 2c 20 |nitializ|ations, |
|00003960| 74 68 65 6e 20 79 6f 75 | 72 20 6d 61 69 6e 20 65 |then you|r main e|
|00003970| 6e 74 72 79 20 70 6f 69 | 6e 74 20 77 6f 75 6c 64 |ntry poi|nt would|
|00003980| 20 62 65 20 5f 5f 73 74 | 61 72 74 20 6f 72 20 5f | be __st|art or _|
|00003990| 5f 63 70 6c 75 73 73 74 | 61 72 74 2c 20 72 65 73 |_cplusst|art, res|
|000039a0| 70 65 63 74 69 76 65 6c | 79 2c 20 72 61 74 68 65 |pectivel|y, rathe|
|000039b0| 72 20 74 68 61 6e 20 6d | 61 69 6e 2e 20 20 4d 6f |r than m|ain. Mo|
|000039c0| 64 69 66 79 20 74 68 65 | 20 70 72 65 76 69 6f 75 |dify the| previou|
|000039d0| 73 20 65 78 61 6d 70 6c | 65 20 61 63 63 6f 72 64 |s exampl|e accord|
|000039e0| 69 6e 67 6c 79 2e 0d 4e | 6f 74 65 3a 20 53 6f 6d |ingly..N|ote: Som|
|000039f0| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 73 20 72 65 6c |e compon|ents rel|
|00003a00| 79 20 6f 6e 20 61 20 d2 | 66 61 73 74 20 64 69 73 |y on a .|fast dis|
|00003a10| 70 61 74 63 68 69 6e 67 | d3 20 6d 65 63 68 61 6e |patching|. mechan|
|00003a20| 69 73 6d 20 66 6f 72 20 | 63 61 6c 6c 69 6e 67 20 |ism for |calling |
|00003a30| 63 6f 6d 70 6f 6e 65 6e | 74 20 66 75 6e 63 74 69 |componen|t functi|
|00003a40| 6f 6e 73 2e 20 20 54 68 | 69 73 20 6d 65 63 68 61 |ons. Th|is mecha|
|00003a50| 6e 69 73 6d 20 69 73 20 | 64 65 70 65 6e 64 65 6e |nism is |dependen|
|00003a60| 74 20 6f 6e 20 74 68 65 | 20 36 38 4b 20 61 72 63 |t on the| 68K arc|
|00003a70| 68 69 74 65 63 74 75 72 | 65 20 61 6e 64 20 69 73 |hitectur|e and is|
|00003a80| 20 75 6e 73 75 70 70 6f | 72 74 65 64 20 66 6f 72 | unsuppo|rted for|
|00003a90| 20 6e 61 74 69 76 65 20 | 63 6f 6d 70 6f 6e 65 6e | native |componen|
|00003aa0| 74 73 2c 20 61 6c 74 68 | 6f 75 67 68 20 69 74 20 |ts, alth|ough it |
|00003ab0| 77 69 6c 6c 20 77 6f 72 | 6b 20 66 6f 72 20 65 6d |will wor|k for em|
|00003ac0| 75 6c 61 74 65 64 20 63 | 6f 6d 70 6f 6e 65 6e 74 |ulated c|omponent|
|00003ad0| 73 20 72 75 6e 6e 69 6e | 67 20 6f 6e 20 74 68 65 |s runnin|g on the|
|00003ae0| 20 50 6f 77 65 72 20 4d | 61 63 69 6e 74 6f 73 68 | Power M|acintosh|
|00003af0| 2e 0d 4e 6f 74 65 3a 20 | 49 6e 20 61 6c 6c 20 74 |..Note: |In all t|
|00003b00| 68 65 73 65 20 6d 6f 64 | 69 66 69 63 61 74 69 6f |hese mod|ificatio|
|00003b10| 6e 73 20 66 6f 72 20 50 | 6f 77 65 72 50 43 2c 20 |ns for P|owerPC, |
|00003b20| 74 68 65 20 6d 6f 73 74 | 20 64 69 66 66 69 63 75 |the most| difficu|
|00003b30| 6c 74 20 74 68 69 6e 67 | 20 74 6f 20 67 65 74 20 |lt thing| to get |
|00003b40| 72 69 67 68 74 20 69 73 | 20 74 68 65 20 50 72 6f |right is| the Pro|
|00003b50| 63 49 6e 66 6f 20 76 61 | 6c 75 65 2e 20 20 49 74 |cInfo va|lue. It|
|00003b60| d5 73 20 76 65 72 79 20 | 65 61 73 79 20 74 6f 20 |.s very |easy to |
|00003b70| 6d 61 6b 65 20 61 20 d2 | 63 75 74 20 61 6e 64 20 |make a .|cut and |
|00003b80| 70 61 73 74 65 d3 20 65 | 72 72 6f 72 2c 20 6f 72 |paste. e|rror, or|
|00003b90| 20 67 65 74 20 61 20 74 | 79 70 65 20 77 72 6f 6e | get a t|ype wron|
|00003ba0| 67 20 28 73 68 6f 72 74 | 20 69 6e 73 74 65 61 64 |g (short| instead|
|00003bb0| 20 6f 66 20 73 68 6f 72 | 74 20 2a 29 2e 20 20 49 | of shor|t *). I|
|00003bc0| 66 20 79 6f 75 72 20 63 | 6f 6d 70 6f 6e 65 6e 74 |f your c|omponent|
|00003bd0| 20 69 73 20 63 72 61 73 | 68 69 6e 67 20 74 68 65 | is cras|hing the|
|00003be0| 20 66 69 72 73 74 20 74 | 68 69 6e 67 20 74 6f 20 | first t|hing to |
|00003bf0| 63 68 65 63 6b 20 28 61 | 6e 64 20 63 68 65 63 6b |check (a|nd check|
|00003c00| 20 61 6e 64 20 63 68 65 | 63 6b 20 61 6e 64 20 63 | and che|ck and c|
|00003c10| 68 65 63 6b 21 29 20 61 | 72 65 20 74 68 65 20 50 |heck!) a|re the P|
|00003c20| 72 6f 63 49 6e 66 6f 20 | 76 61 6c 75 65 73 2e 0d |rocInfo |values..|
|00003c30| 50 61 63 6b 61 67 69 6e | 67 20 74 68 65 20 50 6f |Packagin|g the Po|
|00003c40| 77 65 72 50 43 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |werPC co|mponent |
|00003c50| 69 6e 74 6f 20 61 20 72 | 65 73 6f 75 72 63 65 0d |into a r|esource.|
|00003c60| 50 6f 77 65 72 50 43 20 | 64 65 76 65 6c 6f 70 6d |PowerPC |developm|
|00003c70| 65 6e 74 20 74 6f 6f 6c | 73 20 63 72 65 61 74 65 |ent tool|s create|
|00003c80| 20 79 6f 75 72 20 50 6f | 77 65 72 50 43 20 63 6f | your Po|werPC co|
|00003c90| 64 65 20 69 6e 20 61 20 | 63 6f 64 65 20 66 72 61 |de in a |code fra|
|00003ca0| 67 6d 65 6e 74 20 69 6e | 20 74 68 65 20 64 61 74 |gment in| the dat|
|00003cb0| 61 20 66 6f 72 6b 20 6f | 66 20 74 68 65 20 66 69 |a fork o|f the fi|
|00003cc0| 6c 65 2e 20 20 59 6f 75 | 72 20 63 6f 6d 70 6f 6e |le. You|r compon|
|00003cd0| 65 6e 74 20 63 6f 64 65 | 20 6d 75 73 74 20 62 65 |ent code| must be|
|00003ce0| 20 61 20 72 65 73 6f 75 | 72 63 65 20 28 74 68 65 | a resou|rce (the|
|00003cf0| 20 72 65 73 6f 75 72 63 | 65 20 74 79 70 65 20 61 | resourc|e type a|
|00003d00| 6e 64 20 69 64 20 61 72 | 65 20 73 70 65 63 69 66 |nd id ar|e specif|
|00003d10| 69 65 64 20 69 6e 20 74 | 68 65 20 27 74 68 6e 67 |ied in t|he 'thng|
|00003d20| 27 20 72 65 73 6f 75 72 | 63 65 20 64 65 73 63 72 |' resour|ce descr|
|00003d30| 69 62 65 64 20 62 65 6c | 6f 77 29 2e 20 20 59 6f |ibed bel|ow). Yo|
|00003d40| 75 20 63 61 6e 20 75 73 | 65 20 74 68 65 20 4d 50 |u can us|e the MP|
|00003d50| 57 20 52 65 7a 20 d2 72 | 65 61 64 d3 20 63 6f 6d |W Rez .r|ead. com|
|00003d60| 6d 61 6e 64 20 74 6f 20 | 72 65 61 64 20 66 72 6f |mand to |read fro|
|00003d70| 6d 20 74 68 65 20 64 61 | 74 61 20 66 6f 72 6b 20 |m the da|ta fork |
|00003d80| 69 6e 74 6f 20 61 20 72 | 65 73 6f 75 72 63 65 2e |into a r|esource.|
|00003d90| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 3a 0d 09 | For ex|ample:..|
|00003da0| 72 65 61 64 20 27 6d 79 | 63 70 27 20 28 31 33 30 |read 'my|cp' (130|
|00003db0| 29 20 6d 79 63 6f 6d 70 | 6f 6e 65 6e 74 2e 70 65 |) mycomp|onent.pe|
|00003dc0| 66 3b 0d 72 65 61 64 73 | 20 74 68 65 20 63 6f 64 |f;.reads| the cod|
|00003dd0| 65 20 66 72 61 67 6d 65 | 6e 74 20 66 72 6f 6d 20 |e fragme|nt from |
|00003de0| 74 68 65 20 66 69 6c 65 | 20 6d 79 63 6f 6d 70 6f |the file| mycompo|
|00003df0| 6e 65 6e 74 2e 70 65 66 | 20 61 6e 64 20 63 72 65 |nent.pef| and cre|
|00003e00| 61 74 65 73 20 74 68 65 | 20 72 65 73 6f 75 72 63 |ates the| resourc|
|00003e10| 65 20 27 6d 79 63 70 27 | 28 31 33 30 29 2e 0d 50 |e 'mycp'|(130)..P|
|00003e20| 72 6f 76 69 64 69 6e 67 | 20 61 6e 20 69 6e 74 65 |roviding| an inte|
|00003e30| 72 66 61 63 65 20 74 6f | 20 74 68 65 20 63 6f 6d |rface to| the com|
|00003e40| 70 6f 6e 65 6e 74 0d 49 | 66 20 79 6f 75 20 77 69 |ponent.I|f you wi|
|00003e50| 73 68 20 79 6f 75 72 20 | 63 6f 6d 70 6f 6e 65 6e |sh your |componen|
|00003e60| 74 20 74 6f 20 62 65 20 | 63 61 6c 6c 65 64 20 64 |t to be |called d|
|00003e70| 69 72 65 63 74 6c 79 2c | 20 79 6f 75 20 6d 75 73 |irectly,| you mus|
|00003e80| 74 20 61 6c 73 6f 20 73 | 75 70 70 6c 79 20 61 6e |t also s|upply an|
|00003e90| 20 69 6e 74 65 72 66 61 | 63 65 20 73 6f 20 63 61 | interfa|ce so ca|
|00003ea0| 6c 6c 65 72 73 20 6b 6e | 6f 77 20 68 6f 77 20 74 |llers kn|ow how t|
|00003eb0| 6f 20 63 61 6c 6c 20 69 | 74 2e 20 20 46 6f 72 20 |o call i|t. For |
|00003ec0| 73 74 61 6e 64 61 72 64 | 20 66 75 6e 63 74 69 6f |standard| functio|
|00003ed0| 6e 73 2c 20 73 75 63 68 | 20 61 73 20 4f 70 65 6e |ns, such| as Open|
|00003ee0| 2c 20 43 6c 6f 73 65 2c | 20 56 65 72 73 69 6f 6e |, Close,| Version|
|00003ef0| 2c 20 65 74 63 2e 2c 20 | 74 68 69 73 20 69 73 20 |, etc., |this is |
|00003f00| 6e 6f 74 20 61 20 70 72 | 6f 62 6c 65 6d 20 61 73 |not a pr|oblem as|
|00003f10| 20 74 68 65 20 43 6f 6d | 70 6f 6e 65 6e 74 20 4d | the Com|ponent M|
|00003f20| 61 6e 61 67 65 72 20 73 | 75 70 70 6c 69 65 73 20 |anager s|upplies |
|00003f30| 66 75 6e 63 74 69 6f 6e | 73 20 74 6f 20 64 6f 20 |function|s to do |
|00003f40| 74 68 69 73 20 66 6f 72 | 20 79 6f 75 2e 20 20 4e |this for| you. N|
|00003f50| 6f 72 20 69 73 20 74 68 | 69 73 20 61 20 70 72 6f |or is th|is a pro|
|00003f60| 62 6c 65 6d 20 69 66 20 | 79 6f 75 20 61 72 65 20 |blem if |you are |
|00003f70| 77 72 69 74 69 6e 67 20 | 51 75 69 63 6b 54 69 6d |writing |QuickTim|
|00003f80| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 73 2c 20 61 73 |e compon|ents, as|
|00003f90| 20 51 75 69 63 6b 54 69 | 6d 65 20 73 75 70 70 6c | QuickTi|me suppl|
|00003fa0| 69 65 73 20 73 74 61 6e | 64 61 72 64 20 69 6e 74 |ies stan|dard int|
|00003fb0| 65 72 66 61 63 65 73 20 | 61 6e 64 20 6c 69 62 72 |erfaces |and libr|
|00003fc0| 61 72 69 65 73 20 66 6f | 72 20 63 61 6c 6c 69 6e |aries fo|r callin|
|00003fd0| 67 20 63 6f 6d 70 6f 6e | 65 6e 74 73 2e 0d 42 75 |g compon|ents..Bu|
|00003fe0| 74 20 6f 6e 65 20 6f 66 | 20 74 68 65 20 61 64 76 |t one of| the adv|
|00003ff0| 61 6e 74 61 67 65 73 20 | 6f 66 20 74 68 65 20 43 |antages |of the C|
|00004000| 6f 6d 70 6f 6e 65 6e 74 | 20 4d 61 6e 61 67 65 72 |omponent| Manager|
|00004010| 20 69 73 20 69 74 20 6c | 65 74 73 20 79 6f 75 20 | is it l|ets you |
|00004020| 64 65 66 69 6e 65 20 79 | 6f 75 72 20 6f 77 6e 20 |define y|our own |
|00004030| 72 6f 75 74 69 6e 65 73 | 20 77 69 74 68 20 74 68 |routines| with th|
|00004040| 65 69 72 20 6f 77 6e 20 | 70 61 72 61 6d 65 74 65 |eir own |paramete|
|00004050| 72 20 6c 69 73 74 73 2c | 20 61 6e 64 20 66 6f 72 |r lists,| and for|
|00004060| 20 74 68 65 73 65 20 72 | 6f 75 74 69 6e 65 73 20 | these r|outines |
|00004070| 79 6f 75 20 6d 75 73 74 | 20 73 75 70 70 6c 79 20 |you must| supply |
|00004080| 61 6e 20 69 6e 74 65 72 | 66 61 63 65 2e 20 20 54 |an inter|face. T|
|00004090| 79 70 69 63 61 6c 6c 79 | 2c 20 66 6f 72 20 36 38 |ypically|, for 68|
|000040a0| 4b 20 74 68 69 73 20 69 | 6e 76 6f 6c 76 65 64 20 |K this i|nvolved |
|000040b0| 70 72 6f 76 69 64 69 6e | 67 20 63 61 6c 6c 65 72 |providin|g caller|
|000040c0| 73 20 61 6e 20 69 6e 74 | 65 72 66 61 63 65 20 66 |s an int|erface f|
|000040d0| 69 6c 65 20 77 69 74 68 | 20 66 75 6e 63 74 69 6f |ile with| functio|
|000040e0| 6e 20 70 72 6f 74 6f 74 | 79 70 65 73 20 66 6f 72 |n protot|ypes for|
|000040f0| 20 79 6f 75 72 20 63 61 | 6c 6c 73 20 61 6e 64 20 | your ca|lls and |
|00004100| 69 6e 6c 69 6e 65 20 36 | 38 4b 20 61 73 73 65 6d |inline 6|8K assem|
|00004110| 62 6c 79 20 74 6f 20 61 | 63 74 75 61 6c 6c 79 20 |bly to a|ctually |
|00004120| 6d 61 6b 65 20 74 68 65 | 20 63 61 6c 6c 2e 0d 4f |make the| call..O|
|00004130| 62 76 69 6f 75 73 6c 79 | 2c 20 74 68 65 20 69 6e |bviously|, the in|
|00004140| 6c 69 6e 65 20 36 38 4b | 20 63 6f 64 65 20 69 73 |line 68K| code is|
|00004150| 20 61 20 70 72 6f 62 6c | 65 6d 20 66 6f 72 20 61 | a probl|em for a|
|00004160| 20 6e 61 74 69 76 65 20 | 50 6f 77 65 72 50 43 20 | native |PowerPC |
|00004170| 63 61 6c 6c 65 72 2c 20 | 73 6f 20 79 6f 75 20 6d |caller, |so you m|
|00004180| 75 73 74 20 70 72 6f 76 | 69 64 65 20 67 6c 75 65 |ust prov|ide glue|
|00004190| 20 74 6f 20 61 63 63 6f | 6d 70 6c 69 73 68 20 74 | to acco|mplish t|
|000041a0| 68 65 20 73 61 6d 65 20 | 74 68 69 6e 67 2e 20 20 |he same |thing. |
|000041b0| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 64 69 |The foll|owing di|
|000041c0| 73 63 75 73 73 69 6f 6e | 20 61 6c 73 6f 20 61 70 |scussion| also ap|
|000041d0| 70 6c 69 65 73 20 74 6f | 20 63 61 6c 6c 69 6e 67 |plies to| calling|
|000041e0| 20 61 20 36 38 4b 20 63 | 6f 6d 70 6f 6e 65 6e 74 | a 68K c|omponent|
|000041f0| 20 66 72 6f 6d 20 50 6f | 77 65 72 50 43 20 63 6f | from Po|werPC co|
|00004200| 64 65 2e 20 20 54 68 65 | 20 69 6e 74 65 72 66 61 |de. The| interfa|
|00004210| 63 65 20 69 73 20 74 68 | 65 20 73 61 6d 65 2c 20 |ce is th|e same, |
|00004220| 65 69 74 68 65 72 20 77 | 61 79 2e 0d 54 6f 20 74 |either w|ay..To t|
|00004230| 61 6b 65 20 74 68 65 20 | 65 78 61 6d 70 6c 65 20 |ake the |example |
|00004240| 66 6f 72 20 49 6e 73 69 | 64 65 20 4d 61 63 69 6e |for Insi|de Macin|
|00004250| 74 6f 73 68 3a 20 4d 6f | 72 65 20 4d 61 63 69 6e |tosh: Mo|re Macin|
|00004260| 74 6f 73 68 20 54 6f 6f | 6c 62 6f 78 2c 20 70 61 |tosh Too|lbox, pa|
|00004270| 67 65 20 36 2d 33 30 2c | 20 79 6f 75 20 6d 69 67 |ge 6-30,| you mig|
|00004280| 68 74 20 68 61 76 65 20 | 61 20 63 61 6c 6c 20 6c |ht have |a call l|
|00004290| 69 6b 65 3a 0d 70 61 73 | 63 61 6c 20 43 6f 6d 70 |ike:.pas|cal Comp|
|000042a0| 6f 6e 65 6e 74 52 65 73 | 75 6c 74 20 44 72 61 77 |onentRes|ult Draw|
|000042b0| 65 72 53 65 74 75 70 20 | 28 43 6f 6d 70 6f 6e 65 |erSetup |(Compone|
|000042c0| 6e 74 49 6e 73 74 61 6e | 63 65 20 6d 79 49 6e 73 |ntInstan|ce myIns|
|000042d0| 74 61 6e 63 65 2c 20 52 | 65 63 74 20 2a 72 29 20 |tance, R|ect *r) |
|000042e0| 3d 0d 20 20 20 20 43 6f | 6d 70 6f 6e 65 6e 74 43 |=. Co|mponentC|
|000042f0| 61 6c 6c 4e 6f 77 20 28 | 6b 44 72 61 77 65 72 53 |allNow (|kDrawerS|
|00004300| 65 74 55 70 53 65 6c 65 | 63 74 2c 20 34 29 3b 0d |etUpSele|ct, 4);.|
|00004310| 43 6f 6d 70 6f 6e 65 6e | 74 43 61 6c 6c 4e 6f 77 |Componen|tCallNow|
|00004320| 20 69 73 20 61 20 6d 61 | 63 72 6f 20 74 68 61 74 | is a ma|cro that|
|00004330| 20 65 78 70 61 6e 64 73 | 20 74 6f 20 69 6e 6c 69 | expands| to inli|
|00004340| 6e 65 20 36 38 4b 20 63 | 6f 64 65 20 74 68 61 74 |ne 68K c|ode that|
|00004350| 20 70 75 73 68 65 73 20 | 61 64 64 69 74 69 6f 6e | pushes |addition|
|00004360| 61 6c 20 70 61 72 61 6d | 65 74 65 72 73 20 61 6e |al param|eters an|
|00004370| 64 20 74 68 65 6e 20 65 | 78 65 63 75 74 65 73 20 |d then e|xecutes |
|00004380| 61 6e 20 41 2d 74 72 61 | 70 20 74 6f 20 63 61 6c |an A-tra|p to cal|
|00004390| 6c 20 74 68 65 20 43 6f | 6d 70 6f 6e 65 6e 74 20 |l the Co|mponent |
|000043a0| 4d 61 6e 61 67 65 72 2e | 0d 54 68 65 20 66 69 72 |Manager.|.The fir|
|000043b0| 73 74 20 74 68 69 6e 67 | 20 77 68 65 6e 20 75 73 |st thing| when us|
|000043c0| 69 6e 67 20 74 68 65 20 | 6e 65 77 20 55 6e 69 76 |ing the |new Univ|
|000043d0| 65 72 73 61 6c 20 48 65 | 61 64 65 72 73 2c 20 69 |ersal He|aders, i|
|000043e0| 73 20 74 68 61 74 20 74 | 68 65 20 64 65 66 69 6e |s that t|he defin|
|000043f0| 69 74 69 6f 6e 20 6f 66 | 20 43 6f 6d 70 6f 6e 65 |ition of| Compone|
|00004400| 6e 74 43 61 6c 6c 4e 6f | 77 20 68 61 73 20 63 68 |ntCallNo|w has ch|
|00004410| 61 6e 67 65 64 20 73 6c | 69 67 68 74 6c 79 2e 20 |anged sl|ightly. |
|00004420| 20 54 68 65 20 61 62 6f | 76 65 20 64 65 63 6c 61 | The abo|ve decla|
|00004430| 72 61 74 69 6f 6e 20 77 | 6f 75 6c 64 20 63 68 61 |ration w|ould cha|
|00004440| 6e 67 65 20 74 6f 3a 0d | 70 61 73 63 61 6c 20 43 |nge to:.|pascal C|
|00004450| 6f 6d 70 6f 6e 65 6e 74 | 52 65 73 75 6c 74 20 44 |omponent|Result D|
|00004460| 72 61 77 65 72 53 65 74 | 75 70 20 28 43 6f 6d 70 |rawerSet|up (Comp|
|00004470| 6f 6e 65 6e 74 49 6e 73 | 74 61 6e 63 65 20 6d 79 |onentIns|tance my|
|00004480| 49 6e 73 74 61 6e 63 65 | 2c 20 52 65 63 74 20 2a |Instance|, Rect *|
|00004490| 72 29 20 0d 20 20 20 20 | 43 6f 6d 70 6f 6e 65 6e |r) . |Componen|
|000044a0| 74 43 61 6c 6c 4e 6f 77 | 20 28 6b 44 72 61 77 65 |tCallNow| (kDrawe|
|000044b0| 72 53 65 74 55 70 53 65 | 6c 65 63 74 2c 20 34 29 |rSetUpSe|lect, 4)|
|000044c0| 3b 0d 54 68 65 20 6f 6e | 6c 79 20 64 69 66 66 65 |;.The on|ly diffe|
|000044d0| 72 65 6e 63 65 20 69 6e | 20 74 68 69 73 20 64 65 |rence in| this de|
|000044e0| 63 6c 61 72 61 74 69 6f | 6e 20 69 73 20 74 68 61 |claratio|n is tha|
|000044f0| 74 20 74 68 65 20 d4 3d | d5 20 63 68 61 72 61 63 |t the .=|. charac|
|00004500| 74 65 72 20 69 73 20 6d | 69 73 73 69 6e 67 2e 20 |ter is m|issing. |
|00004510| 20 54 68 69 73 20 69 73 | 20 6e 65 63 65 73 73 61 | This is| necessa|
|00004520| 72 79 20 74 6f 20 61 6c | 6c 6f 77 20 74 68 65 20 |ry to al|low the |
|00004530| 63 6f 64 65 20 74 6f 20 | 63 6f 6d 70 69 6c 65 20 |code to |compile |
|00004540| 66 6f 72 20 62 6f 74 68 | 20 36 38 4b 20 61 6e 64 |for both| 68K and|
|00004550| 20 50 6f 77 65 72 50 43 | 2e 0d 46 6f 72 20 36 38 | PowerPC|..For 68|
|00004560| 4b 20 63 6f 64 65 2c 20 | 43 6f 6d 70 6f 6e 65 6e |K code, |Componen|
|00004570| 74 43 61 6c 6c 4e 6f 77 | 20 63 6f 6e 74 69 6e 75 |tCallNow| continu|
|00004580| 65 73 20 74 6f 20 65 78 | 70 61 6e 64 20 74 6f 20 |es to ex|pand to |
|00004590| 69 6e 6c 69 6e 65 20 36 | 38 4b 20 63 6f 64 65 2c |inline 6|8K code,|
|000045a0| 20 62 75 74 20 66 6f 72 | 20 50 6f 77 65 72 50 43 | but for| PowerPC|
|000045b0| 2c 20 74 68 65 20 43 6f | 6d 70 6f 6e 65 6e 74 43 |, the Co|mponentC|
|000045c0| 61 6c 6c 4e 6f 77 20 6d | 61 63 72 6f 20 65 78 70 |allNow m|acro exp|
|000045d0| 61 6e 64 73 20 74 6f 20 | 6e 6f 74 68 69 6e 67 2c |ands to |nothing,|
|000045e0| 20 77 68 69 63 68 20 6d | 65 61 6e 73 20 74 68 65 | which m|eans the|
|000045f0| 20 61 62 6f 76 65 20 64 | 65 63 6c 61 72 61 74 69 | above d|eclarati|
|00004600| 6f 6e 20 72 65 64 75 63 | 65 73 20 74 6f 3a 0d 70 |on reduc|es to:.p|
|00004610| 61 73 63 61 6c 20 43 6f | 6d 70 6f 6e 65 6e 74 52 |ascal Co|mponentR|
|00004620| 65 73 75 6c 74 20 44 72 | 61 77 65 72 53 65 74 75 |esult Dr|awerSetu|
|00004630| 70 20 28 43 6f 6d 70 6f | 6e 65 6e 74 49 6e 73 74 |p (Compo|nentInst|
|00004640| 61 6e 63 65 20 6d 79 49 | 6e 73 74 61 6e 63 65 2c |ance myI|nstance,|
|00004650| 20 52 65 63 74 20 2a 72 | 29 20 3b 0d 59 6f 75 20 | Rect *r|) ;.You |
|00004660| 6d 75 73 74 20 6e 6f 77 | 20 73 75 70 70 6c 79 20 |must now| supply |
|00004670| 67 6c 75 65 20 66 6f 72 | 20 44 72 61 77 65 72 53 |glue for| DrawerS|
|00004680| 65 74 75 70 20 74 68 61 | 74 20 64 6f 65 73 20 74 |etup tha|t does t|
|00004690| 68 65 20 73 61 6d 65 20 | 74 68 69 6e 67 20 6f 6e |he same |thing on|
|000046a0| 20 50 6f 77 65 72 50 43 | 20 61 73 20 74 68 65 20 | PowerPC| as the |
|000046b0| 36 38 4b 20 69 6e 6c 69 | 6e 65 73 20 77 6f 75 6c |68K inli|nes woul|
|000046c0| 64 20 64 6f 2e 20 20 0d | 54 68 65 20 73 74 72 61 |d do. .|The stra|
|000046d0| 74 65 67 79 20 68 65 72 | 65 20 69 73 20 74 6f 20 |tegy her|e is to |
|000046e0| 6d 69 6d 69 63 20 77 68 | 61 74 20 36 38 4b 20 63 |mimic wh|at 68K c|
|000046f0| 6f 64 65 20 63 61 6c 6c | 69 6e 67 20 79 6f 75 72 |ode call|ing your|
|00004700| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 77 6f 75 6c 64 | compone|nt would|
|00004710| 20 64 6f 2e 20 20 4e 61 | 6d 65 6c 79 2c 20 70 75 | do. Na|mely, pu|
|00004720| 73 68 20 61 20 62 75 6e | 63 68 20 6f 66 20 70 61 |sh a bun|ch of pa|
|00004730| 72 61 6d 65 74 65 72 73 | 20 6f 6e 20 74 68 65 20 |rameters| on the |
|00004740| 73 74 61 63 6b 2c 20 74 | 68 65 6e 20 63 61 6c 6c |stack, t|hen call|
|00004750| 20 74 68 65 20 63 6f 6d | 70 6f 6e 65 6e 74 2e 20 | the com|ponent. |
|00004760| 20 59 6f 75 20 64 6f 20 | 74 68 61 74 20 62 79 20 | You do |that by |
|00004770| 62 75 69 6c 64 69 6e 67 | 20 61 20 73 74 72 75 63 |building| a struc|
|00004780| 74 20 74 68 61 74 20 6c | 6f 6f 6b 73 20 6c 69 6b |t that l|ooks lik|
|00004790| 65 20 74 68 65 20 70 61 | 72 61 6d 65 74 65 72 73 |e the pa|rameters|
|000047a0| 20 61 73 20 74 68 65 79 | 20 77 6f 75 6c 64 20 61 | as they| would a|
|000047b0| 70 70 65 61 72 20 6f 6e | 20 74 68 65 20 36 38 4b |ppear on| the 68K|
|000047c0| 20 73 74 61 63 6b 2e 20 | 20 45 61 63 68 20 63 61 | stack. | Each ca|
|000047d0| 6c 6c 20 77 69 6c 6c 20 | 72 65 71 75 69 72 65 20 |ll will |require |
|000047e0| 61 20 64 69 66 66 65 72 | 65 6e 74 20 73 74 72 75 |a differ|ent stru|
|000047f0| 63 74 20 62 65 63 61 75 | 73 65 20 65 61 63 68 20 |ct becau|se each |
|00004800| 63 61 6c 6c 20 63 61 6e | 20 68 61 76 65 20 64 69 |call can| have di|
|00004810| 66 66 65 72 65 6e 74 20 | 70 61 72 61 6d 65 74 65 |fferent |paramete|
|00004820| 72 73 2e 0d 55 73 65 20 | 74 68 65 20 73 74 72 75 |rs..Use |the stru|
|00004830| 63 74 20 62 65 6c 6f 77 | 20 28 44 72 61 77 65 72 |ct below| (Drawer|
|00004840| 53 65 74 75 70 47 6c 75 | 65 50 42 29 20 61 73 20 |SetupGlu|ePB) as |
|00004850| 61 20 74 65 6d 70 6c 61 | 74 65 2e 20 20 54 68 65 |a templa|te. The|
|00004860| 20 66 69 72 73 74 20 74 | 68 72 65 65 20 66 69 65 | first t|hree fie|
|00004870| 6c 64 73 2c 20 63 6f 6d | 70 6f 6e 65 6e 74 46 6c |lds, com|ponentFl|
|00004880| 61 67 73 2c 20 63 6f 6d | 70 6f 6e 65 6e 74 50 61 |ags, com|ponentPa|
|00004890| 72 61 6d 53 69 7a 65 2c | 20 61 6e 64 20 63 6f 6d |ramSize,| and com|
|000048a0| 70 6f 6e 65 6e 74 57 68 | 61 74 20 61 72 65 20 72 |ponentWh|at are r|
|000048b0| 65 71 75 69 72 65 64 2c | 20 61 73 20 69 73 20 74 |equired,| as is t|
|000048c0| 68 65 20 6c 61 73 74 20 | 66 69 65 6c 64 2c 20 77 |he last |field, w|
|000048d0| 68 69 63 68 20 69 73 20 | 74 68 65 20 63 6f 6d 70 |hich is |the comp|
|000048e0| 6f 6e 65 6e 74 20 69 6e | 73 74 61 6e 63 65 2e 0d |onent in|stance..|
|000048f0| 63 6f 6d 70 6f 6e 65 6e | 74 46 6c 61 67 73 20 69 |componen|tFlags i|
|00004900| 73 20 75 6e 75 73 65 64 | 20 61 6e 64 20 73 68 6f |s unused| and sho|
|00004910| 75 6c 64 20 62 65 20 7a | 65 72 6f 2e 0d 63 6f 6d |uld be z|ero..com|
|00004920| 70 6f 6e 65 6e 74 50 61 | 72 61 6d 53 69 7a 65 20 |ponentPa|ramSize |
|00004930| 69 73 20 74 68 65 20 73 | 69 7a 65 2c 20 69 6e 20 |is the s|ize, in |
|00004940| 62 79 74 65 73 2c 20 6f | 66 20 74 68 65 20 70 61 |bytes, o|f the pa|
|00004950| 72 61 6d 65 74 65 72 73 | 20 74 6f 20 74 68 65 20 |rameters| to the |
|00004960| 63 61 6c 6c 2c 20 6e 6f | 74 20 63 6f 75 6e 74 69 |call, no|t counti|
|00004970| 6e 67 20 74 68 65 20 63 | 6f 6d 70 6f 6e 65 6e 74 |ng the c|omponent|
|00004980| 20 69 6e 73 74 61 6e 63 | 65 2e 20 20 54 68 69 73 | instanc|e. This|
|00004990| 20 69 73 20 74 68 65 20 | 73 61 6d 65 20 6e 75 6d | is the |same num|
|000049a0| 62 65 72 20 74 68 61 74 | 20 69 73 20 70 61 73 73 |ber that| is pass|
|000049b0| 65 64 20 61 73 20 74 68 | 65 20 73 65 63 6f 6e 64 |ed as th|e second|
|000049c0| 20 70 61 72 61 6d 65 74 | 65 72 20 69 6e 20 61 20 | paramet|er in a |
|000049d0| 43 6f 6d 70 6f 6e 65 6e | 74 43 61 6c 6c 4e 6f 77 |Componen|tCallNow|
|000049e0| 20 6d 61 63 72 6f 20 63 | 61 6c 6c 2c 20 61 6e 64 | macro c|all, and|
|000049f0| 20 73 68 6f 75 6c 64 20 | 62 65 20 74 68 65 20 73 | should |be the s|
|00004a00| 61 6d 65 20 61 73 20 74 | 68 65 20 73 69 7a 65 20 |ame as t|he size |
|00004a10| 6f 66 20 74 68 65 20 70 | 61 72 61 6d 73 20 73 74 |of the p|arams st|
|00004a20| 72 75 63 74 2c 20 64 69 | 73 63 75 73 73 65 64 20 |ruct, di|scussed |
|00004a30| 62 65 6c 6f 77 2e 0d 63 | 6f 6d 70 6f 6e 65 6e 74 |below..c|omponent|
|00004a40| 57 68 61 74 20 69 73 20 | 74 68 65 20 73 65 6c 65 |What is |the sele|
|00004a50| 63 74 6f 72 20 66 6f 72 | 20 79 6f 75 72 20 63 6f |ctor for| your co|
|00004a60| 6d 70 6f 6e 65 6e 74 20 | 63 61 6c 6c 2e 20 20 49 |mponent |call. I|
|00004a70| 74 73 20 74 68 65 20 73 | 61 6d 65 20 61 73 20 74 |ts the s|ame as t|
|00004a80| 68 65 20 66 69 72 73 74 | 20 70 61 72 61 6d 65 74 |he first| paramet|
|00004a90| 65 72 20 74 6f 20 61 20 | 43 6f 6d 70 6f 6e 65 6e |er to a |Componen|
|00004aa0| 74 43 61 6c 6c 4e 6f 77 | 20 6d 61 63 72 6f 20 63 |tCallNow| macro c|
|00004ab0| 61 6c 6c 2e 0d 54 68 65 | 20 70 61 72 61 6d 73 20 |all..The| params |
|00004ac0| 66 69 65 6c 64 20 69 73 | 20 61 20 73 65 70 61 72 |field is| a separ|
|00004ad0| 61 74 65 20 73 74 72 75 | 63 74 20 74 68 61 74 20 |ate stru|ct that |
|00004ae0| 65 78 61 63 74 6c 79 20 | 6d 69 72 72 6f 72 73 20 |exactly |mirrors |
|00004af0| 79 6f 75 72 20 70 61 72 | 61 6d 65 74 65 72 73 2e |your par|ameters.|
|00004b00| 20 20 20 54 68 69 73 20 | 6d 75 73 74 20 62 65 20 | This |must be |
|00004b10| 63 75 73 74 6f 6d 69 7a | 65 64 20 66 6f 72 20 79 |customiz|ed for y|
|00004b20| 6f 75 72 20 63 61 6c 6c | 2e 20 20 41 20 73 65 70 |our call|. A sep|
|00004b30| 61 72 61 74 65 20 73 74 | 72 75 63 74 20 69 73 20 |arate st|ruct is |
|00004b40| 75 73 65 64 20 68 65 72 | 65 20 62 65 63 61 75 73 |used her|e becaus|
|00004b50| 65 20 69 74 20 73 69 6d | 70 6c 69 66 69 65 73 20 |e it sim|plifies |
|00004b60| 74 68 65 20 73 69 7a 65 | 6f 66 20 63 61 6c 63 75 |the size|of calcu|
|00004b70| 6c 61 74 69 6f 6e 20 66 | 6f 72 20 74 68 65 20 63 |lation f|or the c|
|00004b80| 6f 6d 70 6f 6e 65 6e 74 | 50 61 72 61 6d 53 69 7a |omponent|ParamSiz|
|00004b90| 65 20 66 69 65 6c 64 2e | 20 20 50 61 72 61 6d 65 |e field.| Parame|
|00004ba0| 74 65 72 73 20 69 6e 20 | 74 68 69 73 20 73 74 72 |ters in |this str|
|00004bb0| 75 63 74 20 61 72 65 20 | 73 70 65 63 69 66 69 65 |uct are |specifie|
|00004bc0| 64 20 69 6e 20 72 65 76 | 65 72 73 65 20 6f 72 64 |d in rev|erse ord|
|00004bd0| 65 72 20 66 72 6f 6d 20 | 74 68 65 20 70 61 72 61 |er from |the para|
|00004be0| 6d 65 74 65 72 20 6c 69 | 73 74 2e 0d 20 0d 4e 6f |meter li|st.. .No|
|00004bf0| 74 65 3a 09 52 65 6d 65 | 6d 62 65 72 20 74 68 61 |te:.Reme|mber tha|
|00004c00| 74 20 74 68 65 20 73 74 | 72 75 63 74 20 6d 69 72 |t the st|ruct mir|
|00004c10| 72 6f 72 73 20 36 38 4b | 20 73 74 61 63 6b 20 61 |rors 68K| stack a|
|00004c20| 6c 69 67 6e 6d 65 6e 74 | 2c 20 6e 6f 74 20 36 38 |lignment|, not 68|
|00004c30| 4b 20 73 74 72 75 63 74 | 20 61 6c 69 67 6e 6d 65 |K struct| alignme|
|00004c40| 6e 74 2e 20 20 54 68 69 | 73 20 6d 65 61 6e 73 20 |nt. Thi|s means |
|00004c50| 74 68 61 74 20 62 79 74 | 65 20 70 61 72 61 6d 65 |that byt|e parame|
|00004c60| 74 65 72 73 2c 20 65 2e | 67 2e 20 63 68 61 72 20 |ters, e.|g. char |
|00004c70| 6f 72 20 42 6f 6f 6c 65 | 61 6e 2c 20 67 65 74 20 |or Boole|an, get |
|00004c80| 70 61 73 73 65 64 20 61 | 73 20 74 77 6f 20 62 79 |passed a|s two by|
|00004c90| 74 65 73 2c 20 6e 6f 74 | 20 6f 6e 65 2e 20 54 68 |tes, not| one. Th|
|00004ca0| 65 20 73 74 72 75 63 74 | 20 6d 75 73 74 20 6d 69 |e struct| must mi|
|00004cb0| 72 72 6f 72 20 74 68 61 | 74 20 66 61 63 74 2c 20 |rror tha|t fact, |
|00004cc0| 73 6f 20 79 6f 75 20 6d | 75 73 74 20 64 65 63 6c |so you m|ust decl|
|00004cd0| 61 72 65 20 62 79 74 65 | 20 66 69 65 6c 64 73 20 |are byte| fields |
|00004ce0| 74 6f 20 62 65 20 61 20 | 62 79 74 65 20 66 69 65 |to be a |byte fie|
|00004cf0| 6c 64 20 66 6f 6c 6c 6f | 77 65 64 20 62 79 20 61 |ld follo|wed by a|
|00004d00| 20 70 61 64 20 62 79 74 | 65 20 66 69 65 6c 64 20 | pad byt|e field |
|00004d10| 61 6e 64 20 74 61 6b 65 | 20 69 74 20 69 6e 74 6f |and take| it into|
|00004d20| 20 61 63 63 6f 75 6e 74 | 20 69 6e 20 79 6f 75 72 | account| in your|
|00004d30| 20 70 61 72 61 6d 65 74 | 65 72 20 73 69 7a 65 20 | paramet|er size |
|00004d40| 63 61 6c 63 75 6c 61 74 | 69 6f 6e 73 2e 0d 20 0d |calculat|ions.. .|
|00004d50| 4f 6e 63 65 20 79 6f 75 | 20 68 61 76 65 20 74 68 |Once you| have th|
|00004d60| 65 20 73 74 72 75 63 74 | 2c 20 69 6e 69 74 69 61 |e struct|, initia|
|00004d70| 6c 69 7a 65 20 69 74 20 | 61 73 20 73 68 6f 77 6e |lize it |as shown|
|00004d80| 20 69 6e 20 74 68 65 20 | 65 78 61 6d 70 6c 65 2c | in the |example,|
|00004d90| 20 61 6e 64 20 63 61 6c | 6c 20 74 68 65 20 63 6f | and cal|l the co|
|00004da0| 6d 70 6f 6e 65 6e 74 20 | 76 69 61 20 43 61 6c 6c |mponent |via Call|
|00004db0| 55 6e 69 76 65 72 73 61 | 6c 50 72 6f 63 20 77 69 |Universa|lProc wi|
|00004dc0| 74 68 20 74 68 65 20 43 | 61 6c 6c 43 6f 6d 70 6f |th the C|allCompo|
|00004dd0| 6e 65 6e 74 55 50 50 2e | 20 20 43 61 6c 6c 43 6f |nentUPP.| CallCo|
|00004de0| 6d 70 6f 6e 65 6e 74 55 | 50 50 20 69 73 20 64 65 |mponentU|PP is de|
|00004df0| 63 6c 61 72 65 64 20 66 | 6f 72 20 79 6f 75 20 61 |clared f|or you a|
|00004e00| 6e 64 20 69 73 20 70 61 | 72 74 20 6f 66 20 74 68 |nd is pa|rt of th|
|00004e10| 65 20 49 6e 74 65 72 66 | 61 63 65 4c 69 62 2e 20 |e Interf|aceLib. |
|00004e20| 20 59 6f 75 20 64 6f 6e | 27 74 20 6e 65 65 64 20 | You don|'t need |
|00004e30| 74 6f 20 64 6f 20 61 6e | 79 74 68 69 6e 67 20 73 |to do an|ything s|
|00004e40| 70 65 63 69 61 6c 20 74 | 6f 20 75 73 65 20 69 74 |pecial t|o use it|
|00004e50| 2e 0d 75 70 70 43 61 6c | 6c 43 6f 6d 70 6f 6e 65 |..uppCal|lCompone|
|00004e60| 6e 74 50 72 6f 63 49 6e | 66 6f 20 73 68 6f 75 6c |ntProcIn|fo shoul|
|00004e70| 64 20 68 61 76 65 20 62 | 65 65 6e 20 69 6e 20 74 |d have b|een in t|
|00004e80| 68 65 20 69 6e 74 65 72 | 66 61 63 65 73 2c 20 62 |he inter|faces, b|
|00004e90| 65 63 61 75 73 65 20 74 | 68 65 20 63 61 6c 6c 20 |ecause t|he call |
|00004ea0| 69 73 20 61 6c 77 61 79 | 73 20 74 68 65 20 73 61 |is alway|s the sa|
|00004eb0| 6d 65 2c 20 62 75 74 20 | 69 74 27 73 20 6e 6f 74 |me, but |it's not|
|00004ec0| 2c 20 73 6f 20 69 74 27 | 73 20 64 65 66 69 6e 65 |, so it'|s define|
|00004ed0| 64 20 62 65 6c 6f 77 2e | 0d 65 6e 75 6d 20 7b 0d |d below.|.enum {.|
|00004ee0| 20 20 20 20 75 70 70 43 | 61 6c 6c 43 6f 6d 70 6f | uppC|allCompo|
|00004ef0| 6e 65 6e 74 50 72 6f 63 | 49 6e 66 6f 20 3d 20 6b |nentProc|Info = k|
|00004f00| 50 61 73 63 61 6c 53 74 | 61 63 6b 42 61 73 65 64 |PascalSt|ackBased|
|00004f10| 0d 09 09 7c 20 52 45 53 | 55 4c 54 5f 53 49 5a 45 |...| RES|ULT_SIZE|
|00004f20| 28 6b 46 6f 75 72 42 79 | 74 65 43 6f 64 65 29 0d |(kFourBy|teCode).|
|00004f30| 09 09 7c 20 53 54 41 43 | 4b 5f 52 4f 55 54 49 4e |..| STAC|K_ROUTIN|
|00004f40| 45 5f 50 41 52 41 4d 45 | 54 45 52 28 31 2c 20 6b |E_PARAME|TER(1, k|
|00004f50| 46 6f 75 72 42 79 74 65 | 43 6f 64 65 29 0d 7d 3b |FourByte|Code).};|
|00004f60| 0d 48 65 72 65 d5 73 20 | 74 68 65 20 63 6f 64 65 |.Here.s |the code|
|00004f70| 20 66 6f 72 20 74 68 65 | 20 67 6c 75 65 20 66 75 | for the| glue fu|
|00004f80| 6e 63 74 69 6f 6e 2e 20 | 20 4f 6e 63 65 20 79 6f |nction. | Once yo|
|00004f90| 75 20 68 61 76 65 20 74 | 68 65 20 73 74 72 75 63 |u have t|he struc|
|00004fa0| 74 75 72 65 20 64 65 66 | 69 6e 65 64 2c 20 63 72 |ture def|ined, cr|
|00004fb0| 65 61 74 65 20 61 6e 20 | 69 6e 73 74 61 6e 74 69 |eate an |instanti|
|00004fc0| 61 74 69 6f 6e 20 6f 66 | 20 69 74 2c 20 61 6e 64 |ation of| it, and|
|00004fd0| 20 69 6e 69 74 69 61 6c | 69 7a 65 20 69 74 2e 20 | initial|ize it. |
|00004fe0| 20 46 69 6e 61 6c 6c 79 | 2c 20 63 61 6c 6c 20 74 | Finally|, call t|
|00004ff0| 68 65 20 63 6f 6d 70 6f | 6e 65 6e 74 20 75 73 69 |he compo|nent usi|
|00005000| 6e 67 20 43 61 6c 6c 55 | 6e 69 76 65 72 73 61 6c |ng CallU|niversal|
|00005010| 50 72 6f 63 20 61 73 20 | 73 68 6f 77 6e 20 69 6e |Proc as |shown in|
|00005020| 20 74 68 65 20 65 78 61 | 6d 70 6c 65 2e 0d 70 61 | the exa|mple..pa|
|00005030| 73 63 61 6c 20 20 43 6f | 6d 70 6f 6e 65 6e 74 52 |scal Co|mponentR|
|00005040| 65 73 75 6c 74 20 20 44 | 72 61 77 65 72 53 65 74 |esult D|rawerSet|
|00005050| 75 70 20 28 43 6f 6d 70 | 6f 6e 65 6e 74 49 6e 73 |up (Comp|onentIns|
|00005060| 74 61 6e 63 65 20 6d 79 | 49 6e 73 74 61 6e 63 65 |tance my|Instance|
|00005070| 2c 20 52 65 63 74 20 2a | 72 29 20 0d 7b 0d 23 64 |, Rect *|r) .{.#d|
|00005080| 65 66 69 6e 65 20 6b 44 | 72 61 77 65 72 53 65 74 |efine kD|rawerSet|
|00005090| 75 70 50 61 72 61 6d 53 | 69 7a 65 09 20 28 73 69 |upParamS|ize. (si|
|000050a0| 7a 65 6f 66 20 28 44 72 | 61 77 65 72 53 65 74 75 |zeof (Dr|awerSetu|
|000050b0| 70 50 61 72 61 6d 73 29 | 29 0d 23 69 66 64 65 66 |pParams)|).#ifdef|
|000050c0| 20 70 6f 77 65 72 63 0d | 23 70 72 61 67 6d 61 20 | powerc.|#pragma |
|000050d0| 6f 70 74 69 6f 6e 73 20 | 61 6c 69 67 6e 3d 6d 61 |options |align=ma|
|000050e0| 63 36 38 6b 0d 23 65 6e | 64 69 66 0d 20 20 20 73 |c68k.#en|dif. s|
|000050f0| 74 72 75 63 74 20 44 72 | 61 77 65 72 53 65 74 75 |truct Dr|awerSetu|
|00005100| 70 50 61 72 61 6d 73 20 | 7b 0d 09 52 65 63 74 09 |pParams |{..Rect.|
|00005110| 2a 74 68 65 52 65 63 74 | 3b 09 09 09 2f 2a 20 59 |*theRect|;.../* Y|
|00005120| 6f 75 72 20 70 61 72 61 | 6d 65 74 65 72 73 20 67 |our para|meters g|
|00005130| 6f 20 68 65 72 65 21 21 | 20 20 49 6e 20 72 65 76 |o here!!| In rev|
|00005140| 65 72 73 65 20 09 09 09 | 09 09 09 20 20 20 6f 72 |erse ...|... or|
|00005150| 64 65 72 20 66 72 6f 6d | 20 70 61 72 61 6d 65 74 |der from| paramet|
|00005160| 65 72 20 6c 69 73 74 2e | 20 2a 2f 0d 20 20 20 7d |er list.| */. }|
|00005170| 3b 0d 20 20 20 74 79 70 | 65 64 65 66 20 73 74 72 |;. typ|edef str|
|00005180| 75 63 74 20 44 72 61 77 | 65 72 53 65 74 75 70 50 |uct Draw|erSetupP|
|00005190| 61 72 61 6d 73 20 44 72 | 61 77 65 72 53 65 74 75 |arams Dr|awerSetu|
|000051a0| 70 50 61 72 61 6d 73 3b | 0d 20 20 20 73 74 72 75 |pParams;|. stru|
|000051b0| 63 74 20 44 72 61 77 65 | 72 53 65 74 75 70 47 6c |ct Drawe|rSetupGl|
|000051c0| 75 65 50 42 20 7b 0d 09 | 75 6e 73 69 67 6e 65 64 |uePB {..|unsigned|
|000051d0| 20 63 68 61 72 09 09 63 | 6f 6d 70 6f 6e 65 6e 74 | char..c|omponent|
|000051e0| 46 6c 61 67 73 3b 09 2f | 2a 20 46 6c 61 67 73 20 |Flags;./|* Flags |
|000051f0| 2d 20 73 65 74 20 74 6f | 20 7a 65 72 6f 20 2a 2f |- set to| zero */|
|00005200| 0d 09 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 09 |..unsign|ed char.|
|00005210| 09 63 6f 6d 70 6f 6e 65 | 6e 74 50 61 72 61 6d 53 |.compone|ntParamS|
|00005220| 69 7a 65 3b 09 2f 2a 20 | 53 69 7a 65 20 6f 66 20 |ize;./* |Size of |
|00005230| 74 68 65 20 70 61 72 61 | 6d 73 20 73 74 72 75 63 |the para|ms struc|
|00005240| 74 20 2a 2f 0d 09 73 68 | 6f 72 74 09 09 09 63 6f |t */..sh|ort...co|
|00005250| 6d 70 6f 6e 65 6e 74 57 | 68 61 74 3b 09 2f 2a 20 |mponentW|hat;./* |
|00005260| 54 68 65 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 72 65 |The comp|onent re|
|00005270| 71 75 65 73 74 20 73 65 | 6c 65 63 74 6f 72 20 2a |quest se|lector *|
|00005280| 2f 0d 09 44 72 61 77 65 | 72 53 65 74 75 70 50 61 |/..Drawe|rSetupPa|
|00005290| 72 61 6d 73 09 70 61 72 | 61 6d 73 3b 09 09 2f 2a |rams.par|ams;../*|
|000052a0| 20 54 68 65 20 70 61 72 | 61 6d 65 74 65 72 73 2c | The par|ameters,|
|000052b0| 20 73 65 65 20 61 62 6f | 76 65 20 2a 2f 0d 09 43 | see abo|ve */..C|
|000052c0| 6f 6d 70 6f 6e 65 6e 74 | 49 6e 73 74 61 6e 63 65 |omponent|Instance|
|000052d0| 09 69 6e 73 74 61 6e 63 | 65 3b 09 09 2f 2a 20 54 |.instanc|e;../* T|
|000052e0| 68 69 73 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 69 6e |his comp|onent in|
|000052f0| 73 74 61 6e 63 65 20 2a | 2f 0d 20 20 20 7d 3b 0d |stance *|/. };.|
|00005300| 20 20 20 74 79 70 65 64 | 65 66 20 73 74 72 75 63 | typed|ef struc|
|00005310| 74 20 44 72 61 77 65 72 | 53 65 74 75 70 47 6c 75 |t Drawer|SetupGlu|
|00005320| 65 50 42 20 44 72 61 77 | 65 72 53 65 74 75 70 47 |ePB Draw|erSetupG|
|00005330| 6c 75 65 50 42 3b 0d 23 | 69 66 64 65 66 20 70 6f |luePB;.#|ifdef po|
|00005340| 77 65 72 63 0d 23 70 72 | 61 67 6d 61 20 6f 70 74 |werc.#pr|agma opt|
|00005350| 69 6f 6e 73 20 61 6c 69 | 67 6e 3d 72 65 73 65 74 |ions ali|gn=reset|
|00005360| 0d 23 65 6e 64 69 66 0d | 20 20 20 44 72 61 77 65 |.#endif.| Drawe|
|00005370| 72 53 65 74 75 70 47 6c | 75 65 50 42 20 6d 79 44 |rSetupGl|uePB myD|
|00005380| 72 61 77 65 72 53 65 74 | 75 70 47 6c 75 65 50 42 |rawerSet|upGluePB|
|00005390| 3b 0d 20 20 20 6d 79 44 | 72 61 77 65 72 53 65 74 |;. myD|rawerSet|
|000053a0| 75 70 47 6c 75 65 50 42 | 2e 63 6f 6d 70 6f 6e 65 |upGluePB|.compone|
|000053b0| 6e 74 46 6c 61 67 73 20 | 3d 20 30 3b 0d 20 20 20 |ntFlags |= 0;. |
|000053c0| 6d 79 44 72 61 77 65 72 | 53 65 74 75 70 47 6c 75 |myDrawer|SetupGlu|
|000053d0| 65 50 42 2e 63 6f 6d 70 | 6f 6e 65 6e 74 50 61 72 |ePB.comp|onentPar|
|000053e0| 61 6d 53 69 7a 65 20 3d | 20 6b 44 72 61 77 65 72 |amSize =| kDrawer|
|000053f0| 53 65 74 75 70 50 61 72 | 61 6d 53 69 7a 65 3b 0d |SetupPar|amSize;.|
|00005400| 20 20 20 79 44 72 61 77 | 65 72 53 65 74 75 70 47 | yDraw|erSetupG|
|00005410| 6c 75 65 50 42 2e 63 6f | 6d 70 6f 6e 65 6e 74 57 |luePB.co|mponentW|
|00005420| 68 61 74 20 3d 20 6b 44 | 72 61 77 65 72 53 65 74 |hat = kD|rawerSet|
|00005430| 55 70 53 65 6c 65 63 74 | 3b 0d 20 20 20 6d 79 44 |UpSelect|;. myD|
|00005440| 72 61 77 65 72 53 65 74 | 75 70 47 6c 75 65 50 42 |rawerSet|upGluePB|
|00005450| 2e 70 61 72 61 6d 73 2e | 74 68 65 52 65 63 74 20 |.params.|theRect |
|00005460| 3d 20 72 3b 0d 20 20 20 | 6d 79 44 72 61 77 65 72 |= r;. |myDrawer|
|00005470| 53 65 74 75 70 47 6c 75 | 65 50 42 2e 69 6e 73 74 |SetupGlu|ePB.inst|
|00005480| 61 6e 63 65 20 3d 20 6d | 79 49 6e 73 74 61 6e 63 |ance = m|yInstanc|
|00005490| 65 3b 0d 20 20 20 72 65 | 74 75 72 6e 20 43 61 6c |e;. re|turn Cal|
|000054a0| 6c 55 6e 69 76 65 72 73 | 61 6c 50 72 6f 63 28 43 |lUnivers|alProc(C|
|000054b0| 61 6c 6c 43 6f 6d 70 6f | 6e 65 6e 74 55 50 50 2c |allCompo|nentUPP,|
|000054c0| 0d 09 09 75 70 70 43 61 | 6c 6c 43 6f 6d 70 6f 6e |...uppCa|llCompon|
|000054d0| 65 6e 74 50 72 6f 63 49 | 6e 66 6f 2c 20 20 26 6d |entProcI|nfo, &m|
|000054e0| 79 44 72 61 77 65 72 53 | 65 74 75 70 47 6c 75 65 |yDrawerS|etupGlue|
|000054f0| 50 42 29 3b 0d 7d 0d 52 | 65 70 65 61 74 20 74 68 |PB);.}.R|epeat th|
|00005500| 65 20 61 62 6f 76 65 20 | 73 74 65 70 73 20 66 6f |e above |steps fo|
|00005510| 72 20 61 6c 6c 20 74 68 | 65 20 70 75 62 6c 69 63 |r all th|e public|
|00005520| 20 66 75 6e 63 74 69 6f | 6e 73 20 66 6f 72 20 79 | functio|ns for y|
|00005530| 6f 75 72 20 63 6f 6d 70 | 6f 6e 65 6e 74 2e 20 20 |our comp|onent. |
|00005540| 54 6f 20 61 6c 6c 6f 77 | 20 66 6f 72 20 66 75 74 |To allow| for fut|
|00005550| 75 72 65 20 75 70 64 61 | 74 69 6e 67 2c 20 74 68 |ure upda|ting, th|
|00005560| 65 20 62 65 73 74 20 77 | 61 79 20 74 6f 20 6d 61 |e best w|ay to ma|
|00005570| 6b 65 20 74 68 69 73 20 | 67 6c 75 65 20 61 76 61 |ke this |glue ava|
|00005580| 69 6c 61 62 6c 65 20 74 | 6f 20 79 6f 75 72 20 63 |ilable t|o your c|
|00005590| 6c 69 65 6e 74 73 20 69 | 73 20 74 6f 20 62 75 69 |lients i|s to bui|
|000055a0| 6c 64 20 74 68 65 20 67 | 6c 75 65 20 69 6e 74 6f |ld the g|lue into|
|000055b0| 20 61 20 43 6f 64 65 20 | 46 72 61 67 6d 65 6e 74 | a Code |Fragment|
|000055c0| 20 4d 61 6e 61 67 65 72 | 20 73 68 61 72 65 64 20 | Manager| shared |
|000055d0| 6c 69 62 72 61 72 79 20 | 74 68 61 74 20 69 73 20 |library |that is |
|000055e0| 62 75 69 6c 74 20 69 6e | 74 6f 20 79 6f 75 72 20 |built in|to your |
|000055f0| 63 6f 6d 70 6f 6e 65 6e | 74 2e 20 20 50 72 6f 76 |componen|t. Prov|
|00005600| 69 64 65 20 79 6f 75 72 | 20 63 6c 69 65 6e 74 20 |ide your| client |
|00005610| 77 69 74 68 20 61 6e 20 | 58 43 4f 46 46 20 66 69 |with an |XCOFF fi|
|00005620| 6c 65 20 74 6f 20 6c 69 | 6e 6b 20 61 67 61 69 6e |le to li|nk again|
|00005630| 73 74 2e 20 20 54 68 61 | 74 20 77 61 79 2c 20 69 |st. Tha|t way, i|
|00005640| 66 20 74 68 65 20 67 6c | 75 65 20 63 68 61 6e 67 |f the gl|ue chang|
|00005650| 65 73 2c 20 74 68 65 20 | 63 6c 69 65 6e 74 20 61 |es, the |client a|
|00005660| 70 70 6c 69 63 61 74 69 | 6f 6e 73 20 77 69 6c 6c |pplicati|ons will|
|00005670| 20 6e 6f 74 20 68 61 76 | 65 20 74 6f 20 62 65 20 | not hav|e to be |
|00005680| 72 65 6c 69 6e 6b 65 64 | 2e 20 20 42 65 20 73 75 |relinked|. Be su|
|00005690| 72 65 20 79 6f 75 20 63 | 68 6f 6f 73 65 20 61 20 |re you c|hoose a |
|000056a0| 75 6e 69 71 75 65 20 6e | 61 6d 65 20 66 6f 72 20 |unique n|ame for |
|000056b0| 74 68 65 20 67 6c 75 65 | 20 6c 69 62 72 61 72 79 |the glue| library|
|000056c0| 20 74 6f 20 61 76 6f 69 | 64 20 70 6f 73 73 69 62 | to avoi|d possib|
|000056d0| 6c 65 20 6e 61 6d 65 20 | 63 6f 6e 66 6c 69 63 74 |le name |conflict|
|000056e0| 73 2e 0d 43 72 65 61 74 | 69 6e 67 20 74 68 65 20 |s..Creat|ing the |
|000056f0| 65 78 74 65 6e 64 65 64 | 20 74 68 6e 67 27 20 43 |extended| thng' C|
|00005700| 6f 6d 70 6f 6e 65 6e 74 | 52 65 73 6f 75 72 63 65 |omponent|Resource|
|00005710| 0d 48 65 72 65 20 69 73 | 20 68 6f 77 20 74 6f 20 |.Here is| how to |
|00005720| 63 72 65 61 74 65 20 74 | 68 65 20 27 74 68 6e 67 |create t|he 'thng|
|00005730| 27 20 43 6f 6d 70 6f 6e | 65 6e 74 52 65 73 6f 75 |' Compon|entResou|
|00005740| 72 63 65 20 66 6f 72 20 | 61 20 63 6f 6d 70 6f 6e |rce for |a compon|
|00005750| 65 6e 74 20 74 68 61 74 | 20 73 75 70 70 6f 72 74 |ent that| support|
|00005760| 73 20 62 6f 74 68 20 70 | 6c 61 74 66 6f 72 6d 36 |s both p|latform6|
|00005770| 38 6b 20 61 6e 64 20 70 | 6c 61 74 66 6f 72 6d 50 |8k and p|latformP|
|00005780| 6f 77 65 72 50 43 2e 20 | 54 68 69 73 20 69 73 20 |owerPC. |This is |
|00005790| 74 68 65 20 73 6f 75 72 | 63 65 20 66 6f 72 20 4d |the sour|ce for M|
|000057a0| 50 57 20 52 65 7a 20 75 | 73 69 6e 67 20 74 68 65 |PW Rez u|sing the|
|000057b0| 20 6c 61 74 65 73 74 20 | 76 65 72 73 69 6f 6e 20 | latest |version |
|000057c0| 6f 66 20 54 79 70 65 73 | 2e 72 20 74 68 61 74 20 |of Types|.r that |
|000057d0| 73 75 70 70 6f 72 74 73 | 20 74 68 65 20 55 73 65 |supports| the Use|
|000057e0| 45 78 74 65 6e 64 65 64 | 54 68 69 6e 67 52 65 73 |Extended|ThingRes|
|000057f0| 6f 75 72 63 65 20 74 65 | 6d 70 6c 61 74 65 2e 20 |ource te|mplate. |
|00005800| 42 65 66 6f 72 65 20 75 | 73 69 6e 67 20 74 68 65 |Before u|sing the|
|00005810| 20 6e 65 77 20 54 79 70 | 65 73 2e 72 20 79 6f 75 | new Typ|es.r you|
|00005820| 20 6e 65 65 64 20 74 6f | 20 64 65 66 69 6e 65 20 | need to| define |
|00005830| 74 68 65 20 55 73 65 45 | 78 74 65 6e 64 65 64 54 |the UseE|xtendedT|
|00005840| 68 69 6e 67 52 65 73 6f | 75 72 63 65 20 63 6f 6e |hingReso|urce con|
|00005850| 64 69 74 69 6f 6e 61 6c | 20 77 69 74 68 20 74 68 |ditional| with th|
|00005860| 65 20 76 61 6c 75 65 20 | 31 2e 20 41 20 20 63 6f |e value |1. A co|
|00005870| 6d 70 6f 6e 65 6e 74 20 | 64 65 66 69 6e 65 64 20 |mponent |defined |
|00005880| 77 69 74 68 20 74 68 69 | 73 20 72 65 73 6f 75 72 |with thi|s resour|
|00005890| 63 65 20 77 69 6c 6c 20 | 77 6f 72 6b 20 66 6f 72 |ce will |work for|
|000058a0| 20 61 6c 6c 20 70 72 65 | 76 69 6f 75 73 20 76 65 | all pre|vious ve|
|000058b0| 72 73 69 6f 6e 73 20 6f | 66 20 74 68 65 20 43 6f |rsions o|f the Co|
|000058c0| 6d 70 6f 6e 65 6e 74 20 | 4d 61 6e 61 67 65 72 2e |mponent |Manager.|
|000058d0| 20 42 79 20 6b 65 65 70 | 69 6e 67 20 74 68 65 20 | By keep|ing the |
|000058e0| 6f 72 69 67 69 6e 61 6c | 20 70 6f 72 74 69 6f 6e |original| portion|
|000058f0| 73 20 6f 66 20 74 68 65 | 20 43 6f 6d 70 6f 6e 65 |s of the| Compone|
|00005900| 6e 74 52 65 73 6f 75 72 | 63 65 20 73 65 74 75 70 |ntResour|ce setup|
|00005910| 20 66 6f 72 20 74 68 65 | 20 70 6c 61 74 66 6f 72 | for the| platfor|
|00005920| 6d 36 38 6b 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |m68k inf|ormation|
|00005930| 2c 20 69 74 20 61 6c 6c | 6f 77 73 20 79 6f 75 72 |, it all|ows your|
|00005940| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 74 6f 20 77 6f | compone|nt to wo|
|00005950| 72 6b 20 6f 6e 20 61 6c | 6c 20 36 38 4b 20 4d 61 |rk on al|l 68K Ma|
|00005960| 63 69 6e 74 6f 73 68 20 | 63 6f 6d 70 75 74 65 72 |cintosh |computer|
|00005970| 73 2e 20 41 64 64 69 6e | 67 20 74 68 65 20 6e 65 |s. Addin|g the ne|
|00005980| 77 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 61 62 |w inform|ation ab|
|00005990| 6f 75 74 20 79 6f 75 72 | 20 63 6f 64 65 20 66 72 |out your| code fr|
|000059a0| 61 67 6d 65 6e 74 20 66 | 6f 72 20 74 68 65 20 50 |agment f|or the P|
|000059b0| 6f 77 65 72 20 4d 61 63 | 69 6e 74 6f 73 68 20 61 |ower Mac|intosh a|
|000059c0| 6c 6c 6f 77 73 20 74 68 | 65 20 43 6f 6d 70 6f 6e |llows th|e Compon|
|000059d0| 65 6e 74 20 4d 61 6e 61 | 67 65 72 20 66 6f 72 20 |ent Mana|ger for |
|000059e0| 74 68 61 74 20 6d 61 63 | 68 69 6e 65 20 74 6f 20 |that mac|hine to |
|000059f0| 75 73 65 20 79 6f 75 72 | 20 6e 61 74 69 76 65 20 |use your| native |
|00005a00| 63 6f 64 65 2e 0d 72 65 | 73 6f 75 72 63 65 20 27 |code..re|source '|
|00005a10| 74 68 6e 67 27 20 28 31 | 32 38 2c 20 70 75 72 67 |thng' (1|28, purg|
|00005a20| 65 61 62 6c 65 29 20 7b | 0d 20 20 20 20 6b 43 6f |eable) {|. kCo|
|00005a30| 6d 70 6f 6e 65 6e 74 54 | 79 70 65 2c 0d 20 20 20 |mponentT|ype,. |
|00005a40| 20 6b 43 6f 6d 70 6f 6e | 65 6e 74 53 75 62 54 79 | kCompon|entSubTy|
|00005a50| 70 65 2c 0d 20 20 20 20 | 6b 43 6f 6d 70 6f 6e 65 |pe,. |kCompone|
|00005a60| 6e 74 43 72 65 61 74 6f | 72 2c 0d 20 20 20 20 63 |ntCreato|r,. c|
|00005a70| 6d 70 57 61 6e 74 73 52 | 65 67 69 73 74 65 72 4d |mpWantsR|egisterM|
|00005a80| 65 73 73 61 67 65 2c 0d | 20 20 20 20 6b 41 6e 79 |essage,.| kAny|
|00005a90| 43 6f 6d 70 6f 6e 65 6e | 74 46 6c 61 67 73 4d 61 |Componen|tFlagsMa|
|00005aa0| 73 6b 2c 0d 20 20 20 20 | 6b 36 38 4b 43 6f 64 65 |sk,. |k68KCode|
|00005ab0| 54 79 70 65 2c 20 6b 36 | 38 4b 43 6f 64 65 49 44 |Type, k6|8KCodeID|
|00005ac0| 2c 0d 20 20 20 20 27 53 | 54 52 20 27 2c 20 6b 43 |,. 'S|TR ', kC|
|00005ad0| 6f 6d 70 6f 6e 65 6e 74 | 4e 61 6d 65 53 74 72 69 |omponent|NameStri|
|00005ae0| 6e 67 49 44 2c 0d 20 20 | 20 20 27 53 54 52 20 27 |ngID,. | 'STR '|
|00005af0| 2c 20 6b 43 6f 6d 70 6f | 6e 65 6e 74 49 6e 66 6f |, kCompo|nentInfo|
|00005b00| 53 74 72 69 6e 67 49 44 | 2c 0d 20 20 20 20 27 49 |StringID|,. 'I|
|00005b10| 43 4f 4e 27 2c 20 6b 43 | 6f 6d 70 6f 6e 65 6e 74 |CON', kC|omponent|
|00005b20| 49 63 6f 6e 49 44 2c 0d | 23 69 66 20 55 73 65 45 |IconID,.|#if UseE|
|00005b30| 78 74 65 6e 64 65 64 54 | 68 69 6e 67 52 65 73 6f |xtendedT|hingReso|
|00005b40| 75 72 63 65 0d 20 20 20 | 20 30 78 30 30 30 31 30 |urce. | 0x00010|
|00005b50| 30 30 31 2c 20 20 20 20 | 20 20 20 20 20 20 20 20 |001, | |
|00005b60| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 76 65 72 73 | | /* vers|
|00005b70| 69 6f 6e 20 31 2e 31 20 | 2a 2f 0d 20 20 20 20 63 |ion 1.1 |*/. c|
|00005b80| 6f 6d 70 6f 6e 65 6e 74 | 48 61 73 4d 75 6c 74 69 |omponent|HasMulti|
|00005b90| 70 6c 65 50 6c 61 74 66 | 6f 72 6d 73 2c 0d 20 20 |plePlatf|orms,. |
|00005ba0| 20 20 6b 43 6f 6d 70 6f | 6e 65 6e 74 49 63 6f 6e | kCompo|nentIcon|
|00005bb0| 46 61 6d 69 6c 79 49 44 | 2c 0d 20 20 20 20 7b 0d |FamilyID|,. {.|
|00005bc0| 20 20 20 20 20 20 20 20 | 63 6d 70 57 61 6e 74 73 | |cmpWants|
|00005bd0| 52 65 67 69 73 74 65 72 | 4d 65 73 73 61 67 65 2c |Register|Message,|
|00005be0| 20 6b 36 38 4b 43 6f 64 | 65 54 79 70 65 2c 20 6b | k68KCod|eType, k|
|00005bf0| 36 38 4b 43 6f 64 65 49 | 44 2c 20 70 6c 61 74 66 |68KCodeI|D, platf|
|00005c00| 6f 72 6d 36 38 6b 2c 0d | 20 20 20 20 20 20 20 20 |orm68k,.| |
|00005c10| 63 6d 70 57 61 6e 74 73 | 52 65 67 69 73 74 65 72 |cmpWants|Register|
|00005c20| 4d 65 73 73 61 67 65 2c | 20 6b 50 6f 77 65 72 50 |Message,| kPowerP|
|00005c30| 43 43 6f 64 65 54 79 70 | 65 2c 20 6b 50 6f 77 65 |CCodeTyp|e, kPowe|
|00005c40| 72 50 43 43 6f 64 65 49 | 44 2c 20 70 6c 61 74 66 |rPCCodeI|D, platf|
|00005c50| 6f 72 6d 50 6f 77 65 72 | 50 43 0d 20 20 20 20 7d |ormPower|PC. }|
|00005c60| 3b 0d 23 65 6e 64 69 66 | 0d 7d 3b 0d 49 66 20 79 |;.#endif|.};.If y|
|00005c70| 6f 75 20 68 61 76 65 20 | 61 20 63 6f 6d 70 6f 6e |ou have |a compon|
|00005c80| 65 6e 74 20 74 68 61 74 | 20 6f 6e 6c 79 20 73 75 |ent that| only su|
|00005c90| 70 70 6f 72 74 73 20 74 | 68 65 20 36 38 4b 20 4d |pports t|he 68K M|
|00005ca0| 61 63 69 6e 74 6f 73 68 | 2c 20 74 68 65 6e 20 79 |acintosh|, then y|
|00005cb0| 6f 75 20 64 6f 20 6e 6f | 74 20 6e 65 65 64 20 74 |ou do no|t need t|
|00005cc0| 6f 20 75 73 65 20 74 68 | 65 20 65 78 74 65 6e 64 |o use th|e extend|
|00005cd0| 65 64 20 43 6f 6d 70 6f | 6e 65 6e 74 52 65 73 6f |ed Compo|nentReso|
|00005ce0| 75 72 63 65 20 73 74 72 | 75 63 74 75 72 65 2e 20 |urce str|ucture. |
|00005cf0| 48 6f 77 65 76 65 72 2c | 20 69 66 20 79 6f 75 20 |However,| if you |
|00005d00| 77 69 73 68 20 74 6f 20 | 75 74 69 6c 69 7a 65 20 |wish to |utilize |
|00005d10| 49 63 6f 6e 20 46 61 6d | 69 6c 69 65 73 20 61 6e |Icon Fam|ilies an|
|00005d20| 64 20 61 75 74 6f 6d 61 | 74 69 63 20 76 65 72 73 |d automa|tic vers|
|00005d30| 69 6f 6e 20 72 65 67 69 | 73 74 72 61 74 69 6f 6e |ion regi|stration|
|00005d40| 2c 20 74 68 65 6e 20 75 | 73 65 20 74 68 65 20 65 |, then u|se the e|
|00005d50| 78 74 65 6e 64 65 64 20 | 43 6f 6d 70 6f 6e 65 6e |xtended |Componen|
|00005d60| 74 52 65 73 6f 75 72 63 | 65 20 77 69 74 68 6f 75 |tResourc|e withou|
|00005d70| 74 20 74 68 65 20 43 6f | 6d 70 6f 6e 65 6e 74 50 |t the Co|mponentP|
|00005d80| 6c 61 74 66 6f 72 6d 49 | 6e 66 6f 20 61 6e 64 20 |latformI|nfo and |
|00005d90| 64 6f 20 6e 6f 74 20 73 | 65 74 20 74 68 65 20 63 |do not s|et the c|
|00005da0| 6f 6d 70 6f 6e 65 6e 74 | 48 61 73 4d 75 6c 74 69 |omponent|HasMulti|
|00005db0| 70 6c 65 50 6c 61 74 66 | 6f 72 6d 73 20 66 6c 61 |plePlatf|orms fla|
|00005dc0| 67 20 6f 66 20 74 68 65 | 20 63 6f 6d 70 6f 6e 65 |g of the| compone|
|00005dd0| 6e 74 52 65 67 69 73 74 | 65 72 46 6c 61 67 73 2e |ntRegist|erFlags.|
|00005de0| 20 59 6f 75 20 6d 61 79 | 20 61 6c 73 6f 20 69 6e | You may| also in|
|00005df0| 63 6c 75 64 65 20 74 68 | 65 20 43 6f 6d 70 6f 6e |clude th|e Compon|
|00005e00| 65 6e 74 50 6c 61 74 66 | 6f 72 6d 49 6e 66 6f 20 |entPlatf|ormInfo |
|00005e10| 69 66 20 79 6f 75 20 77 | 69 73 68 20 74 6f 20 61 |if you w|ish to a|
|00005e20| 6e 64 20 6a 75 73 74 20 | 68 61 76 65 20 61 20 73 |nd just |have a s|
|00005e30| 69 6e 67 6c 65 20 65 6c | 65 6d 65 6e 74 20 74 68 |ingle el|ement th|
|00005e40| 61 74 20 64 65 73 63 72 | 69 62 65 73 20 79 6f 75 |at descr|ibes you|
|00005e50| 72 20 36 38 4b 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |r 68K co|mponent |
|00005e60| 63 6f 64 65 2e 0d 49 66 | 20 79 6f 75 20 68 61 76 |code..If| you hav|
|00005e70| 65 20 61 20 d2 66 61 74 | d3 20 63 6f 6d 70 6f 6e |e a .fat|. compon|
|00005e80| 65 6e 74 2c 20 77 69 74 | 68 20 62 6f 74 68 20 36 |ent, wit|h both 6|
|00005e90| 38 4b 20 61 6e 64 20 50 | 6f 77 65 72 50 43 20 63 |8K and P|owerPC c|
|00005ea0| 6f 64 65 2c 20 73 65 74 | 20 74 68 65 20 63 6f 6d |ode, set| the com|
|00005eb0| 70 6f 6e 65 6e 74 20 66 | 6c 61 67 73 20 61 73 20 |ponent f|lags as |
|00005ec0| 79 6f 75 20 77 6f 75 6c | 64 20 66 6f 72 20 74 68 |you woul|d for th|
|00005ed0| 65 20 36 38 4b 20 6f 6e | 6c 79 20 63 61 73 65 20 |e 68K on|ly case |
|00005ee0| 61 6e 64 20 64 75 70 6c | 69 63 61 74 65 20 74 68 |and dupl|icate th|
|00005ef0| 61 74 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 69 |at infor|mation i|
|00005f00| 6e 20 74 68 65 20 43 6f | 6d 70 6f 6e 65 6e 74 50 |n the Co|mponentP|
|00005f10| 6c 61 74 66 6f 72 6d 49 | 6e 66 6f 20 70 6f 72 74 |latformI|nfo port|
|00005f20| 69 6f 6e 20 6f 66 20 74 | 68 65 20 65 78 74 65 6e |ion of t|he exten|
|00005f30| 64 65 64 20 72 65 73 6f | 75 72 63 65 2e 20 20 54 |ded reso|urce. T|
|00005f40| 68 61 74 20 77 69 6c 6c | 20 61 6c 6c 6f 77 20 79 |hat will| allow y|
|00005f50| 6f 75 72 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 74 6f |our comp|onent to|
|00005f60| 20 77 6f 72 6b 20 63 6f | 72 72 65 63 74 6c 79 20 | work co|rrectly |
|00005f70| 66 6f 72 20 76 65 72 73 | 69 6f 6e 73 20 6f 66 20 |for vers|ions of |
|00005f80| 74 68 65 20 43 6f 6d 70 | 6f 6e 65 6e 74 20 4d 61 |the Comp|onent Ma|
|00005f90| 6e 61 67 65 72 20 74 68 | 61 74 20 61 72 65 20 6e |nager th|at are n|
|00005fa0| 6f 74 20 61 77 61 72 65 | 20 6f 66 20 74 68 65 20 |ot aware| of the |
|00005fb0| 65 78 74 65 6e 64 65 64 | 20 27 74 68 6e 67 27 20 |extended| 'thng' |
|00005fc0| 72 65 73 6f 75 72 63 65 | 2e 0d 49 66 20 79 6f 75 |resource|..If you|
|00005fd0| 20 68 61 76 65 20 61 20 | 63 6f 6d 70 6f 6e 65 6e | have a |componen|
|00005fe0| 74 20 74 68 61 74 20 6f | 6e 6c 79 20 73 75 70 70 |t that o|nly supp|
|00005ff0| 6f 72 74 73 20 74 68 65 | 20 50 6f 77 65 72 50 43 |orts the| PowerPC|
|00006000| 20 69 6e 20 6e 61 74 69 | 76 65 20 6d 6f 64 65 2c | in nati|ve mode,|
|00006010| 20 74 68 65 6e 20 79 6f | 75 20 6d 75 73 74 20 75 | then yo|u must u|
|00006020| 73 65 20 74 68 65 20 65 | 78 74 65 6e 64 65 64 20 |se the e|xtended |
|00006030| 43 6f 6d 70 6f 6e 65 6e | 74 52 65 73 6f 75 72 63 |Componen|tResourc|
|00006040| 65 2e 20 49 6e 20 74 68 | 69 73 20 63 61 73 65 2c |e. In th|is case,|
|00006050| 20 73 6f 6d 65 20 63 61 | 72 65 20 6d 75 73 74 20 | some ca|re must |
|00006060| 62 65 20 74 61 6b 65 6e | 20 73 6f 20 74 68 61 74 |be taken| so that|
|00006070| 20 74 68 65 20 63 6f 6d | 70 6f 6e 65 6e 74 20 77 | the com|ponent w|
|00006080| 69 6c 6c 20 6e 6f 74 20 | 62 65 20 72 65 67 69 73 |ill not |be regis|
|00006090| 74 65 72 65 64 20 6f 6e | 20 36 38 4b 20 6d 61 63 |tered on| 68K mac|
|000060a0| 68 69 6e 65 73 2e 20 20 | 53 65 74 20 74 68 65 20 |hines. |Set the |
|000060b0| 52 65 73 6f 75 72 63 65 | 53 70 65 63 20 66 69 65 |Resource|Spec fie|
|000060c0| 6c 64 20 69 6e 20 74 68 | 65 20 6e 6f 6e 2d 65 78 |ld in th|e non-ex|
|000060d0| 74 65 6e 64 65 64 20 70 | 61 72 74 20 6f 66 20 74 |tended p|art of t|
|000060e0| 68 65 20 27 74 68 6e 67 | 27 20 72 65 73 6f 75 72 |he 'thng|' resour|
|000060f0| 63 65 20 74 6f 20 7a 65 | 72 6f 2e 20 49 6e 20 61 |ce to ze|ro. In a|
|00006100| 64 64 69 74 69 6f 6e 2c | 20 73 65 74 20 74 68 65 |ddition,| set the|
|00006110| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 66 6c 61 67 73 | compone|nt flags|
|00006120| 20 69 6e 20 74 68 65 20 | 6e 6f 6e 2d 65 78 74 65 | in the |non-exte|
|00006130| 6e 64 65 64 20 70 61 72 | 74 20 20 6f 66 20 74 68 |nded par|t of th|
|00006140| 65 20 72 65 73 6f 75 72 | 63 65 20 74 6f 20 63 6d |e resour|ce to cm|
|00006150| 70 57 61 6e 74 73 52 65 | 67 69 73 74 65 72 4d 65 |pWantsRe|gisterMe|
|00006160| 73 73 61 67 65 2c 20 72 | 65 67 61 72 64 6c 65 73 |ssage, r|egardles|
|00006170| 73 20 6f 66 20 77 68 65 | 74 68 65 72 20 6f 72 20 |s of whe|ther or |
|00006180| 6e 6f 74 20 79 6f 75 20 | 68 61 6e 64 6c 65 20 74 |not you |handle t|
|00006190| 68 65 20 72 65 67 69 73 | 74 65 72 20 6d 65 73 73 |he regis|ter mess|
|000061a0| 61 67 65 2e 20 20 54 68 | 69 73 20 77 69 6c 6c 20 |age. Th|is will |
|000061b0| 63 61 75 73 65 20 74 68 | 65 20 36 38 4b 20 43 6f |cause th|e 68K Co|
|000061c0| 6d 70 6f 6e 65 6e 74 20 | 4d 61 6e 61 67 65 72 20 |mponent |Manager |
|000061d0| 74 6f 20 61 74 74 65 6d | 70 74 20 74 6f 20 72 65 |to attem|pt to re|
|000061e0| 67 69 73 74 65 72 20 79 | 6f 75 72 20 63 6f 6d 70 |gister y|our comp|
|000061f0| 6f 6e 65 6e 74 2c 20 69 | 74 20 77 69 6c 6c 20 66 |onent, i|t will f|
|00006200| 61 69 6c 2c 20 62 65 63 | 61 75 73 65 20 74 68 65 |ail, bec|ause the|
|00006210| 72 65 20 69 73 20 6e 6f | 20 36 38 4b 20 63 6f 64 |re is no| 68K cod|
|00006220| 65 20 72 65 73 6f 75 72 | 63 65 20 61 6e 64 20 79 |e resour|ce and y|
|00006230| 6f 75 72 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 77 69 |our comp|onent wi|
|00006240| 6c 6c 20 6e 6f 74 20 62 | 65 20 72 65 67 69 73 74 |ll not b|e regist|
|00006250| 65 72 65 64 2e 0d 46 6f | 72 20 74 68 65 20 50 6f |ered..Fo|r the Po|
|00006260| 77 65 72 50 43 20 63 61 | 73 65 2c 20 79 6f 75 20 |werPC ca|se, you |
|00006270| 6e 65 65 64 20 74 6f 20 | 69 6e 63 6c 75 64 65 20 |need to |include |
|00006280| 61 20 73 69 6e 67 6c 65 | 20 43 6f 6d 70 6f 6e 65 |a single| Compone|
|00006290| 6e 74 50 6c 61 74 66 6f | 72 6d 49 6e 66 6f 20 65 |ntPlatfo|rmInfo e|
|000062a0| 6c 65 6d 65 6e 74 20 74 | 68 61 74 20 64 65 73 63 |lement t|hat desc|
|000062b0| 72 69 62 65 73 20 79 6f | 75 72 20 50 6f 77 65 72 |ribes yo|ur Power|
|000062c0| 50 43 20 6e 61 74 69 76 | 65 20 63 6f 6d 70 6f 6e |PC nativ|e compon|
|000062d0| 65 6e 74 20 63 6f 64 65 | 20 66 6f 72 20 50 6f 77 |ent code| for Pow|
|000062e0| 65 72 50 43 20 69 6d 70 | 6c 65 6d 65 6e 74 61 74 |erPC imp|lementat|
|000062f0| 69 6f 6e 73 20 6f 66 20 | 79 6f 75 72 20 63 6f 6d |ions of |your com|
|00006300| 70 6f 6e 65 6e 74 20 74 | 6f 20 62 65 20 72 65 67 |ponent t|o be reg|
|00006310| 69 73 74 65 72 65 64 2e | 20 20 53 65 74 20 74 68 |istered.| Set th|
|00006320| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 20 66 6c 61 67 |e compon|ent flag|
|00006330| 73 20 69 6e 20 74 68 65 | 20 65 78 74 65 6e 64 65 |s in the| extende|
|00006340| 64 20 70 6f 72 74 69 6f | 6e 20 6f 66 20 74 68 65 |d portio|n of the|
|00006350| 20 72 65 73 6f 75 72 63 | 65 20 61 73 20 79 6f 75 | resourc|e as you|
|00006360| 20 77 6f 75 6c 64 20 6e | 6f 72 6d 61 6c 6c 79 2e | would n|ormally.|
|00006370| 20 0d 43 6f 6d 70 6f 6e | 65 6e 74 20 4d 61 6e 61 | .Compon|ent Mana|
|00006380| 67 65 72 20 69 6e 74 65 | 72 66 61 63 65 73 0d 2f |ger inte|rfaces./|
|00006390| 2a 20 4d 50 57 20 52 65 | 7a 20 69 6e 74 65 72 66 |* MPW Re|z interf|
|000063a0| 61 63 65 73 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |aces */.|#define |
|000063b0| 63 6d 70 57 61 6e 74 73 | 52 65 67 69 73 74 65 72 |cmpWants|Register|
|000063c0| 4d 65 73 73 61 67 65 20 | 09 09 28 31 3c 3c 33 31 |Message |..(1<<31|
|000063d0| 29 20 20 20 20 09 2f 2a | 20 62 69 74 73 20 66 6f |) ./*| bits fo|
|000063e0| 72 20 63 6f 6d 70 6f 6e | 65 6e 74 20 0d 09 09 09 |r compon|ent ....|
|000063f0| 09 09 09 09 09 20 20 20 | 66 6c 61 67 73 20 2a 2f |..... |flags */|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.